xtd 1.0.0
Loading...
Searching...
No Matches
formatable.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "iformatable.hpp"
7#include "raw_type.hpp"
8#include "string_view.hpp"
9#include "textual.hpp"
10#include <concepts>
11
13namespace xtd {
15 namespace globalization {
16 class culture_info;
17 }
19 // Since Doxygen does not work properly with the C++ concept, the documentation for this concept is declared in xtd/formatable_.hpp
20 template<typename value_t>
21 concept formatable =
22 std::derived_from<xtd::raw_type<value_t>, xtd::iformatable> ||
23 requires(const xtd::raw_type<value_t>& value, xtd::string_view format, xtd::globalization::culture_info culture) {{value.to_string(format, culture)} -> xtd::textual;} ||
25}
Provides information about a specific culture (called a locale for unmanaged code development)....
Definition culture_info.hpp:42
Provides functionality to format the value of an object into a string representation.
Definition iformatable.hpp:42
Definition formatable.hpp:21
Definition stream_insertable.hpp:13
Definition textual.hpp:16
auto format(const xtd::string &fmt, args_t &&... args) -> xtd::string
Writes the text representation of the specified arguments list, to string using the specified format ...
Definition format.hpp:21
std::basic_string_view< char > string_view
Represents an object that can refer to a constant contiguous sequence of char_t with the first elemen...
Definition string_view.hpp:15
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 classes that define culture-related information, including language, country/region,...
Definition culture_info.hpp:19
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::raw_type alias.
Contains xtd::stream_insertable concept.
Contains xtd::string_view alias.
Contains xtd::textual concept.