5#define __XTD_STD_INTERNAL__
7#undef __XTD_STD_INTERNAL__
12#if defined(__xtd__cpp_lib_format)
33 template<
typename type_t>
49 template<typename other_t>
51 constexpr
value_type(other_t&& value) noexcept : __t__ {value} {}
55 template<
typename other_t>
56 requires std::is_same_v<xtd::raw_type<other_t>,
native_type> && (!std::is_same_v<xtd::raw_type<other_t>,
value_type>)
57 value_type& operator =(other_t&& value)
noexcept {__t__ = value;
return *
this;}
58 [[nodiscard]]
constexpr operator native_type() const noexcept {
return __t__;}
65 template<
typename type_t>
67 inline std::ostream& operator <<(std::ostream& os,
const xtd::value_type<bool>&
v) {
return os << (
v ?
"true" :
"false");}
73#if defined(__xtd__cpp_lib_format)
74template<
typename type_t>
75struct std::formatter<
xtd::value_type<type_t>> : std::formatter<type_t> {
auto format(
const xtd::value_type<type_t>& v, format_context& ctx)
const {
return std::formatter<type_t>::format(
v.value, ctx);}};
77struct std::formatter<
xtd::value_type<bool>> : std::formatter<bool> {
auto format(
const xtd::value_type<bool>& v, format_context& ctx)
const {
return v ?
"true" :
"false";}};
std::remove_cvref_t< value_t > raw_type
Represents a raw type alias equivalent to std::remove_cvref_t<value_t>.
Definition raw_type.hpp:25
@ v
The V key.
Definition console_key.hpp:130
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
std::add_cv_t< type_t > value_type
Represents the read_only_span value type.
Definition read_only_span.hpp:60
Contains xtd::raw_type alias.
type_t native_type
Represents the native type.
Definition value_type.hpp:39
constexpr value_type() noexcept=default
Create a new instance of the value_type.