xtd 0.2.0
Loading...
Searching...
No Matches
xtd::is_stream_insertable< value_t, class > Struct Template Reference
Inheritance diagram for xtd::is_stream_insertable< value_t, class >:

Definition

template<class value_t, class = void>
struct xtd::is_stream_insertable< value_t, class >

Type trait that determines whether a type can be inserted into an std::ostream using the stream insertion operator (operator<<).

Definition
template<class value_t>
struct is_stream_insertable<value_t, std::void_t<decltype(std::declval<std::ostream&>() << std::declval<const value_t&>())>> : std::true_type {};
Type trait that determines whether a type can be inserted into an std::ostream using the stream inser...
Definition is_stream_insertable.hpp:34
Header
#include <xtd/is_stream_insertable>
Namespace
xtd
Library
xtd.core

This trait evaluates to std::true_type if the following expression is valid:

std::declval<std::ostream&>() << std::declval<const value_t&>()

Otherwise, it evaluates to std::false_type.

Template Parameters
value_tThe type to test for stream insertability.
Note
This trait only checks syntactic validity of the insertion expression. It does not guarantee any particular semantic meaning or formatting quality of the output.
See also
is_stream_insertable_v

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