cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
toolbox::traits::has_size< T, typename > Struct Template Reference

检查类型是否有size成员/Check if type has size member More...

#include <type_traits.hpp>

Inheritance diagram for toolbox::traits::has_size< T, typename >:

Detailed Description

template<typename T, typename = void>
struct toolbox::traits::has_size< T, typename >

检查类型是否有size成员/Check if type has size member

Template Parameters
T要检查的类型/Type to check
voidSFINAE参数/SFINAE parameter
// 检查容器类型/Check container types
static_assert(has_size<std::vector<int>>::value);
static_assert(!has_size<int>::value);
检查类型是否有size成员/Check if type has size member
Definition type_traits.hpp:414

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