5#ifndef DUNE_COMMON_STD_IMPL_CONTAINER_CONSTRUCTION_TRAITS_HH 
    6#define DUNE_COMMON_STD_IMPL_CONTAINER_CONSTRUCTION_TRAITS_HH 
   20template <
class Container>
 
   21struct ContainerConstructionTraits
 
   23  using container_type = Container;
 
   24  using value_type = 
typename container_type::value_type;
 
   26  static constexpr container_type construct (std::size_t 
size)
 
   28    return container_type(
size);
 
   31  static constexpr container_type construct (std::size_t 
size, value_type value)
 
   33    return container_type(
size, value);
 
   37template <
class Value, std::
size_t N>
 
   38struct ContainerConstructionTraits<
std::array<Value,N>>
 
   40  using container_type = std::array<Value,N>;
 
   41  using value_type = 
typename container_type::value_type;
 
   43  static constexpr container_type construct ([[maybe_unused]] std::size_t 
size)
 
   46    return container_type{};
 
   49  static constexpr container_type construct ([[maybe_unused]] std::size_t 
size, value_type value)
 
Namespace for features backported from new C++ standards.
Definition: algorithm.hh:19
 
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75