xtd 0.2.0
Loading...
Searching...
No Matches
is_stream_insertable.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <type_traits>
6#include <ostream>
7
9namespace xtd {
33 template<class value_t, class = void>
34 struct is_stream_insertable : std::false_type {};
53 template<class value_t>
54struct is_stream_insertable < value_t, std::void_t < decltype(std::declval<std::ostream&>() << std::declval<const std::remove_cvref_t<value_t>&>()) >> : std::true_type {};
73 template<class value_t>
74 requires std::is_enum_v<std::remove_cvref_t<value_t>>
75 struct is_stream_insertable<value_t> : std::false_type {};
76
99 template<class value_t>
100 inline constexpr bool is_stream_insertable_v = is_stream_insertable<std::remove_cvref_t<value_t>>::value;
101}
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Type trait that determines whether a type can be inserted into an std::ostream using the stream inser...
Definition is_stream_insertable.hpp:34