You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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.
@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, andmaster
. With 9.4 and 9.5, if I include<deal.II/base/std_cxx17/optional.h>
, for example, I end up with symbolsstd_cxx17::optional
that I can use in the code. But if I usemaster
, then the#include
ends up with an unconditional warning from the compiler. I could work around this by only#include
ing this file ifDEAL_II_HAVE_CXX17
is not set, and#include <optional>
instead, but then the class I want is no longer available innamespace 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?
The text was updated successfully, but these errors were encountered: