xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd
arithmeticable
xtd::arithmeticable< type_t > Struct Template Reference
﹡ libraries
»
xtd.core
|
system
»
concepts
Definition
template<typename type_t>
struct xtd::arithmeticable< type_t >
Represents the arithmeticable concept.
Definition
template
<
typename
type_t>
concept
xtd::arithmeticable
=
xtd::addable<type_t>
&&
xtd::divisible<type_t>
&&
xtd::multipliable<type_t>
&&
xtd::subtractable<type_t>
;
xtd::addable
Definition
addable.hpp:12
xtd::arithmeticable
Definition
arithmeticable.hpp:14
xtd::divisible
Definition
divisible.hpp:12
xtd::multipliable
Definition
multipliable.hpp:12
xtd::subtractable
Definition
subtractable.hpp:12
Header
#include <xtd/arithmeticable>
Namespace
xtd
Library
xtd.core
Examples
The following code shows how to use
xtd::arithmeticable
concept
#include <xtd/xtd>
auto
print_is_arithmeticable(
auto
value)
noexcept
{
println
(
"{} ({}) {} arithmeticable"
, value, type_of(value),
arithmeticable
<
decltype
(value)> ?
"is"
:
"is not"
);
}
auto
main() ->
int
{
print_is_arithmeticable(42);
print_is_arithmeticable(
time_span
{1, 2, 3});
print_is_arithmeticable(version {1, 2, 3});
}
// This code produces the following output :
//
// 42 (int) is arithmeticable
// 01:02:03 (xtd::time_span) is not arithmeticable
// 1.2.3 (xtd::version) is not arithmeticable
xtd::time_span
Represents a time interval.
Definition
time_span.hpp:29
xtd::println
auto println(FILE *file) -> void
Writes the current line terminator to the file output stream using the specified format information.
Definition
println.hpp:14
The documentation for this struct was generated from the following file:
xtd.core/include/xtd/
arithmeticable_.hpp
Generated on
for xtd by
Gammasoft
. All rights reserved.