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_indexable
andis_range
since there are CamelCase alternativesHasNan
,IsIndexable
andIsIterable
) -
!936 (merged) (Deprecated
Dune::void_t
in favor ofstd::void_t
. It must be tested whether all supported compilers have the same behaviour with the old replacementStd::void_t
and 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_array
in favor of std c++ implementations.
In the old issue #83 (closed) some other deprecation/removals are proposed:
-
ToUniquePtr
in favor ofstd::unique_ptr
, see also !912 (merged) - Deprecated
Std::is_callable
andStd::is_invocable
in favor ofstd::is_invocable
(see !969 (merged)) - Deprecate
Std::to_true_type
andStd::to_false_type
. There is no std c++ equivalent. UseDune::AlwaysTrue
andDune::AlwaysFalse
instead. (see !971 (merged))
More deprecated functionality:
-
Std::conjunction
,Std::disjunction
, adStd::negation
should 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_t
andreal_t
fromdune/common/typetraits.hh
todune/common/ftraits.hh
Edited by Timo Koch