A helper class to simulate a single named argument. More...
#include <di/util/named_arguments.h>
Public Types | |
| using | Tag = Tag_ |
| using | Type = T |
Public Member Functions | |
| NamedArgument ()=default | |
| template<typename U> requires (!concepts::DecaySameAs<NamedArgument, U> && concepts::ConstructibleFrom<T, U>) | |
| constexpr | explicit (!concepts::ConvertibleTo< U, T >) NamedArgument(U &&value) |
| template<typename... Args> requires (concepts::ConstructibleFrom<T, Args...>) | |
| constexpr | NamedArgument (InPlace, Args &&... args) |
| constexpr auto | value () &-> T & |
| constexpr auto | value () const &-> T const & |
| constexpr auto | value () &&-> T && |
| constexpr auto | value () const &&-> T const && |
Static Public Attributes | |
| static constexpr bool | is_named_argument = true |
A helper class to simulate a single named argument.
Tag The tag type for the named argument.
T The type of the named argument.
This class models a single named argument, where the name is essentially the tag type. Typically, this class is used with CRTP, so the tag type is the derived class.
| using di::util::NamedArgument< Tag_, T >::Tag = Tag_ |
| using di::util::NamedArgument< Tag_, T >::Type = T |
|
explicitdefault |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
staticconstexpr |