Krita Source Code Documentation
Loading...
Searching...
No Matches
KritaUtils::is_appendable_container< T > Struct Template Reference

#include <krita_container_utils.h>

Public Types

typedef std::remove_const< T >::type test_type
 

Static Public Member Functions

template<typename A >
static constexpr bool test (...)
 
template<typename A , typename R = decltype(std::declval<A&>().push_back(std::declval<typename A::value_type>()))>
static constexpr bool test (A *)
 

Static Public Attributes

static const bool value = test<test_type>(nullptr)
 

Detailed Description

template<typename T>
struct KritaUtils::is_appendable_container< T >

Definition at line 86 of file krita_container_utils.h.

Member Typedef Documentation

◆ test_type

template<typename T >
typedef std::remove_const<T>::type KritaUtils::is_appendable_container< T >::test_type

Definition at line 88 of file krita_container_utils.h.

Member Function Documentation

◆ test() [1/2]

template<typename T >
template<typename A >
static constexpr bool KritaUtils::is_appendable_container< T >::test ( ...)
inlinestaticconstexpr

Definition at line 96 of file krita_container_utils.h.

96 {
97 return false;
98 }

◆ test() [2/2]

template<typename T >
template<typename A , typename R = decltype(std::declval<A&>().push_back(std::declval<typename A::value_type>()))>
static constexpr bool KritaUtils::is_appendable_container< T >::test ( A * )
inlinestaticconstexpr

Definition at line 91 of file krita_container_utils.h.

91 {
92 return is_container<A>::value && std::is_same<R, void>::value;
93 }

Member Data Documentation

◆ value

template<typename T >
const bool KritaUtils::is_appendable_container< T >::value = test<test_type>(nullptr)
static

Definition at line 100 of file krita_container_utils.h.


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