RESTinio
Loading...
Searching...
No Matches
restinio
utils
tagged_scalar.hpp
Go to the documentation of this file.
1
/*
2
* RESTinio
3
*/
4
11
12
#pragma once
13
14
#include <
restinio/compiler_features.hpp
>
15
16
#include <type_traits>
17
18
namespace
restinio
19
{
20
21
namespace
utils
22
{
23
24
//
25
// tagged_scalar_t
26
//
52
template
<
typename
Scalar,
typename
Tag >
53
class
tagged_scalar_t
54
{
55
static_assert
( std::is_scalar<Scalar>::value,
56
"Scalar is expected to be scalar type"
);
57
58
Scalar
m_value
;
59
60
public
:
61
constexpr
explicit
tagged_scalar_t
( Scalar
value
) noexcept
62
:
m_value
{
value
}
63
{}
64
65
[[nodiscard]]
66
constexpr
Scalar
67
value
() const noexcept {
return
m_value
; }
68
};
69
70
}
/* namespace utils */
71
72
}
/* namespace restinio */
73
restinio::utils::tagged_scalar_t< std::size_t, max_parallel_connections_tag >::m_value
std::size_t m_value
Definition
tagged_scalar.hpp:58
restinio::utils::tagged_scalar_t::tagged_scalar_t
constexpr tagged_scalar_t(Scalar value) noexcept
Definition
tagged_scalar.hpp:61
restinio::utils::tagged_scalar_t< std::size_t, max_parallel_connections_tag >::value
constexpr std::size_t value() const noexcept
Definition
tagged_scalar.hpp:67
compiler_features.hpp
Detection of compiler version and absence of various features.
restinio::utils
Definition
at_scope_exit.hpp:23
restinio
Definition
asio_include.hpp:21
Generated by
1.13.2