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 and is_range since there are CamelCase alternatives HasNan, IsIndexable and IsIterable)
  • !936 (merged) (Deprecated Dune::void_t in favor of std::void_t. It must be tested whether all supported compilers have the same behaviour with the old replacement Std::void_t and the standard std::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, and Dune::Std::make_array in favor of std c++ implementations.

In the old issue #83 (closed) some other deprecation/removals are proposed:

  • ToUniquePtr in favor of std::unique_ptr, see also !912 (merged)
  • Deprecated Std::is_callable and Std::is_invocable in favor of std::is_invocable (see !969 (merged))
  • Deprecate Std::to_true_type and Std::to_false_type. There is no std c++ equivalent. Use Dune::AlwaysTrue and Dune::AlwaysFalse instead. (see !971 (merged))

More deprecated functionality:

  • Std::conjunction, Std::disjunction, ad Std::negation should be deprecated in favor of std::conjunction, std::disjunction, and std::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 and real_t from dune/common/typetraits.hh to dune/common/ftraits.hh
Edited by Timo Koch