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

检查类型是否有size()成员函数的类型特征 / Type trait to check if type has size() member function More...

#include <functional.hpp>

Inheritance diagram for toolbox::functional::detail::has_size< T, typename >:

Detailed Description

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

检查类型是否有size()成员函数的类型特征 / Type trait to check if type has size() member function

static_assert(has_size<std::vector<int>>::value, "有size / has size");
static_assert(!has_size<int>::value, "没有size / no size");
检查类型是否有size()成员函数的类型特征 / Type trait to check if type has size() member function
Definition functional.hpp:128

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