Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink deprecation of the <deal.II/base/std_cxx17/*> header files. #15733

Closed
bangerth opened this issue Jul 13, 2023 · 2 comments · Fixed by #15736
Closed

Rethink deprecation of the <deal.II/base/std_cxx17/*> header files. #15733

bangerth opened this issue Jul 13, 2023 · 2 comments · Fixed by #15736
Milestone

Comments

@bangerth
Copy link
Member

@masterleinad A question:

When you deprecated the headers in deal.II/base/std_cxx17 in #15563, the idea was presumably that these headers were no longer necessary for users because we now require C++17 and so they shouldn't #include them any more. But that jumps the gun (I think). For example, ASPECT can currently be compiled with deal.II 9.4, 9.5, and master. With 9.4 and 9.5, if I include <deal.II/base/std_cxx17/optional.h>, for example, I end up with symbols std_cxx17::optional that I can use in the code. But if I use master, then the #include ends up with an unconditional warning from the compiler. I could work around this by only #includeing this file if DEAL_II_HAVE_CXX17 is not set, and #include <optional> instead, but then the class I want is no longer available in namespace std_cxx17.

I think what we should have done is to do an "early deprecate" on the header file -- or perhaps not deprecate it at all right away, and instead leave that for after the next release. Thoughts?

@masterleinad
Copy link
Member

I just followed what we did for the std_cxx14 headers but given that use DEAL_II_DEPRECATED_EARLY for other deprecations, we should probably guard the warning with DEAL_II_EARLY_DEPRECATIONS. #15736 does that.

@tamiko
Copy link
Member

tamiko commented Jul 13, 2023

Easy fix. The deprecations will give a warning in two years and the header will be removed in three.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants