LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Trait with type Base
, plus the constantness as in Key
.
More...
#include "MetaUtils.h"
Public Types | |
using | type = std::remove_const_t< Base > |
Trait with type Base
, plus the constantness as in Key
.
Base | the basic type being returned |
Key | a type expressing the constantness wanted for Base |
The type
member of this trait is:
Base
with constantness removed, if Key
is non-constant typeBase
with constantness added, if Key
is a constant typeThis trait passes through references. Both Base
and Key
are treated as they were no references (e.g. a int const&
is treated as a int const
). The referenceness of the type in the trait is the same as the one of Base
.
Therefore, for example:
with_const_as<int const, double>
yields int
;with_const_as<int const, double const>
yields int const
;with_const_as<int const&, double>
yields int&
;with_const_as<int, double const&>
yields int const
.R-value references are likewise taken into account.
Definition at line 506 of file MetaUtils.h.
|
inherited |
Definition at line 726 of file MetaUtils.h.