JayBeams  0.1
Another project to have fun coding.
Public Types | Static Public Attributes | Static Private Member Functions | List of all members
jb::testing::has_resize< C > Class Template Reference

Type trait to evaluate if a collection of numbers (e.g. More...

#include <resize_if_applicable.hpp>

Public Types

using type = decltype(check< C >(nullptr))
 

Static Public Attributes

static constexpr bool value = type::value
 

Static Private Member Functions

template<typename T >
static constexpr auto check (T *) -> typename std::is_void< decltype(std::declval< T >().resize(std::declval< std::size_t >()))>::type
 
template<typename T >
static constexpr std::false_type check (...)
 

Detailed Description

template<typename C>
class jb::testing::has_resize< C >

Type trait to evaluate if a collection of numbers (e.g.

vector, multi_array) is resizable.

has_risize<C>::value is std::true_type if C is resizable. std::false_type otherwise.

Template Parameters
Ccollection of numbers type to be evaluated if it is resizable

Definition at line 19 of file resize_if_applicable.hpp.

Member Typedef Documentation

◆ type

template<typename C>
using jb::testing::has_resize< C >::type = decltype(check<C>(nullptr))

Definition at line 33 of file resize_if_applicable.hpp.

Member Function Documentation

◆ check() [1/2]

template<typename C>
template<typename T >
static constexpr auto jb::testing::has_resize< C >::check ( T *  ) -> typename std::is_void< decltype(std::declval<T>().resize(std::declval<std::size_t>()))>::type
inlinestaticprivate

Definition at line 22 of file resize_if_applicable.hpp.

◆ check() [2/2]

template<typename C>
template<typename T >
static constexpr std::false_type jb::testing::has_resize< C >::check (   ...)
inlinestaticprivate

Definition at line 28 of file resize_if_applicable.hpp.

Member Data Documentation

◆ value

template<typename C>
constexpr bool jb::testing::has_resize< C >::value = type::value
static

Definition at line 34 of file resize_if_applicable.hpp.


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