rippled
Loading...
Searching...
No Matches
include
xrpl
beast
utility
maybe_const.h
1
#ifndef BEAST_UTILITY_MAYBE_CONST_H_INCLUDED
2
#define BEAST_UTILITY_MAYBE_CONST_H_INCLUDED
3
4
#include <
type_traits
>
5
6
namespace
beast
{
7
9
template
<
bool
IsConst,
class
T>
10
struct
maybe_const
11
{
12
explicit
maybe_const
() =
default
;
13
using
type
=
typename
std::conditional
<
14
IsConst,
15
typename
std::remove_const<T>::type
const
,
16
typename
std::remove_const<T>::type
>
::type
;
17
};
18
20
template
<
bool
IsConst,
class
T>
21
using
maybe_const_t
=
typename
maybe_const<IsConst, T>::type
;
22
23
}
// namespace beast
24
25
#endif
std::conditional
beast
Definition
base_uint.h:653
beast::maybe_const_t
typename maybe_const< IsConst, T >::type maybe_const_t
Alias for omitting typename.
Definition
maybe_const.h:21
std::remove_const
beast::maybe_const
Makes T const or non const depending on a bool.
Definition
maybe_const.h:11
beast::maybe_const::type
typename std::conditional< IsConst, typename std::remove_const< T >::type const, typename std::remove_const< T >::type >::type type
Definition
maybe_const.h:16
beast::maybe_const::maybe_const
maybe_const()=default
type_traits
Generated by
1.9.8