SpECTRE  v2024.04.12
tt::can_be_copy_constructed< T, typename > Struct Template Reference

Check if T is copy constructible. More...

#include <CanBeCopyConstructed.hpp>

Detailed Description

template<typename T, typename = void>
struct tt::can_be_copy_constructed< T, typename >

Check if T is copy constructible.

The STL std::is_copy_constructible does not work as expected with some types, such as std::unordered_map. This is because std::is_copy_constructible only checks that the copy construction call is well-formed, not that it could actually be done in practice. To get around this for containers we check that T::value_type is also copy constructible.


The documentation for this struct was generated from the following file: