Reference documentation for deal.II version GIT f0f8c7fe18 2023-03-21 21:25:02+00:00
std_cxx20 Namespace Reference

ranges

## Classes

struct  type_identity

## Typedefs

template<class T >
using type_identity_t = typename type_identity< T >::type

## Detailed Description

deal.II currently only requires a C++14-conforming compiler, but there are a number of functions and classes from the C++20 standard that are easy to provide also in case the compiler only supports C++14. These are collected in the current namespace.

One example is the std::ranges::iota_view class that was introduced to C++ starting with the C++20 standard. It is used as the return type for the ReferenceCell::face_indices(), ReferenceCell::vertex_indices(), and FEValuesBase::quadrature_point_indices() functions, among others, to support range-based for loops (see deal.II and Modern C++ standards for examples of range-based for loops, as well as the documentation of the functions mentioned above).

There are other small additions in this namespace that allow us to use C++20 features at this point already, even though we don't require a C++20-compliant compiler.

Note
If the compiler in use actually does support C++20, then the contents of this namespace are simply imported classes and functions from namespace std. That is, we fall back to what the compiler provides, rather than our own implementations.

## ◆ type_identity_t

template<class T >
 using std_cxx20::type_identity_t = typedef typename type_identity::type

Definition at line 96 of file type_traits.h.