Clean up our type_traits headers (again again)
Some Dune::Std type-traits are not needed anymore, since there are std c++17 replacements available in all supported compilers. This should be cleaned up.
Some cleanup already is proposed in MRs:
-
!935 (merged) (Remove deprecated type-traits that were renamed: remove
has_nan,is_indexableandis_rangesince there are CamelCase alternativesHasNan,IsIndexableandIsIterable) -
!936 (merged) (Deprecated
Dune::void_tin favor ofstd::void_t. It must be tested whether all supported compilers have the same behaviour with the old replacementStd::void_tand the standardstd::void_t. The implementation might be different. -
!933 (merged) (Remove cxx feature checks that are already in c++17 standard library: This deprecates the fallback implementations
Dune::Std::apply,Dune::Std::bool_constant, andDune::Std::make_arrayin favor of std c++ implementations.
In the old issue #83 (closed) some other deprecation/removals are proposed:
-
ToUniquePtrin favor ofstd::unique_ptr, see also !912 (merged) - Deprecated
Std::is_callableandStd::is_invocablein favor ofstd::is_invocable(see !969 (merged)) - Deprecate
Std::to_true_typeandStd::to_false_type. There is no std c++ equivalent. UseDune::AlwaysTrueandDune::AlwaysFalseinstead. (see !971 (merged))
More deprecated functionality:
-
Std::conjunction,Std::disjunction, adStd::negationshould be deprecated in favor ofstd::conjunction,std::disjunction, andstd::negation, respectively, or simply variadic fold expressions like(exprs &&...)(see !972 (merged))
What is left in dune/common/std/type_traits.hh are the is-detected utilities (that are very helpful)
Other proposed cleanup:
- Move
field_tandreal_tfromdune/common/typetraits.hhtodune/common/ftraits.hh
Edited by Timo Koch