#include "tensorstore/util/element_traits.h"
template <typename Source, typename Dest>
constexpr bool tensorstore::IsElementTypeImplicitlyConvertible =
   
 (std::is_const_v<Source> <= std::is_const_v<Dest>) &&
   
 (std::is_same_v<const Source, const Dest> ||
    
 std::is_void_v<Source> < std::is_void_v<Dest>);

Metafunction that evaluates to true if an array of Source-type elements is implicitly convertible to an array of Dest-type elements.

Implicit conversions are (where T indicates a non-const type):

Source

Dest

T

const T

T

void

T

const void

const T

const void

void

const void