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

检查类型是否可打印/Check if type is printable More...

#include <type_traits.hpp>

Static Public Attributes

static constexpr bool value = decltype(test<T>(0))::value
 

Detailed Description

template<typename T>
struct toolbox::traits::is_printable< T >

检查类型是否可打印/Check if type is printable

Template Parameters
T要检查的类型/Type to check
struct Printable { friend std::ostream& operator<<(std::ostream& os, const
Printable&) { return os; } }; struct NonPrintable {};
static_assert(is_printable<int>::value);
static constexpr bool value
Definition type_traits.hpp:450

Member Data Documentation

◆ value

template<typename T >
constexpr bool toolbox::traits::is_printable< T >::value = decltype(test<T>(0))::value
staticconstexpr

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