xtd 1.0.0
Loading...
Searching...
No Matches
stringable.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "iformatable.hpp"
7#include "istringable.hpp"
8#include "iterable.hpp"
9#include "object.hpp"
10#include "raw_type.hpp"
11#include "textual.hpp"
12#include <concepts>
13
15namespace xtd {
16 // Since Doxygen does not work properly with the C++ concept, the documentation for this concept is declared in xtd/stringable_.hpp
17 template<typename value_t>
18 concept stringable =
19 std::derived_from<xtd::raw_type<value_t>, xtd::object> ||
20 std::derived_from<xtd::raw_type<value_t>, xtd::istringable<xtd::raw_type<value_t>>> ||
21 std::derived_from<xtd::raw_type<value_t>, xtd::iformatable> ||
22 requires (const xtd::raw_type<value_t>& value) {{value.to_string()} -> xtd::textual;} ||
23 requires (const xtd::raw_type<value_t>& value, const xtd::string& fmt) {{value.to_string(fmt)} -> xtd::textual;} ||
24 std::derived_from<xtd::raw_type<value_t>, std::exception> ||
25 std::is_enum_v<xtd::raw_type<value_t>> ||
26 xtd::iterable<xtd::raw_type<value_t>> ||
27 xtd::stream_insertable<value_t>;
28}
Provides functionality to format the value of an object into a string representation.
Definition iformatable.hpp:42
Provides a way to represent the current object as a string.
Definition istringable.hpp:26
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Definition stringable.hpp:18
Definition textual.hpp:16
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
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
Contains xtd::iformatable interface.
Contains xtd::istringable interface.
Contains xtd::iterable concept.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::raw_type alias.
Contains xtd::stream_insertable concept.
Contains xtd::textual concept.