Advanced Multi-Physics (AMP)
On-Line Documentation
Static Public Attributes | Private Types | Static Private Member Functions | List of all members
AMP::has_size< T > Struct Template Reference

Checks whether T has a size() function. More...

#include <TypeTraits.h>

Static Public Attributes

static constexpr bool value = std::is_same<decltype( test<T>( 0 ) ), yes>::value
 

Private Types

typedef std::false_type no
 
typedef std::true_type yes
 

Static Private Member Functions

template<typename >
static no test (...)
 
template<typename U >
static auto test (int) -> decltype(std::declval< U >().size()==1, yes())
 

Detailed Description

template<typename T>
struct AMP::has_size< T >

Checks whether T has a size() function.

Definition at line 56 of file TypeTraits.h.

Member Typedef Documentation

◆ no

template<typename T >
typedef std::false_type AMP::has_size< T >::no
private

Definition at line 59 of file TypeTraits.h.

◆ yes

template<typename T >
typedef std::true_type AMP::has_size< T >::yes
private

Definition at line 58 of file TypeTraits.h.

Member Function Documentation

◆ test() [1/2]

template<typename T >
template<typename >
static no AMP::has_size< T >::test (   ...)
staticprivate

◆ test() [2/2]

template<typename T >
template<typename U >
static auto AMP::has_size< T >::test ( int  ) -> decltype(std::declval< U >().size()==1, yes())
staticprivate

Member Data Documentation

◆ value

template<typename T >
constexpr bool AMP::has_size< T >::value = std::is_same<decltype( test<T>( 0 ) ), yes>::value
staticconstexpr

Definition at line 63 of file TypeTraits.h.


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page