RESTinio
Loading...
Searching...
No Matches
tagged_scalar.hpp
Go to the documentation of this file.
1/*
2 * RESTinio
3 */
4
12#pragma once
13
15
16#include <type_traits>
17
18namespace restinio
19{
20
21namespace utils
22{
23
24//
25// tagged_scalar_t
26//
52template< typename Scalar, typename Tag >
54{
55 static_assert( std::is_scalar<Scalar>::value,
56 "Scalar is expected to be scalar type" );
57
59
60public:
61 constexpr explicit tagged_scalar_t( Scalar value ) noexcept
62 : m_value{ value }
63 {}
64
66 constexpr Scalar
68};
69
70} /* namespace utils */
71
72} /* namespace restinio */
73
Helper template for defining tagged scalar types.
RESTINIO_NODISCARD constexpr Scalar value() const noexcept
constexpr tagged_scalar_t(Scalar value) noexcept
Detection of compiler version and absence of various features.
#define RESTINIO_NODISCARD
run_on_this_thread_settings_t< Traits > on_this_thread()
A special marker for the case when http_server must be run on the context of the current thread.
#define const
Definition zconf.h:230