#include <key.h>
Class template to store Key traits outside the Key class, allowing for reuse both in the Key class itself and in helper implementation details.
| T | The type of the key. |
Public Types | |
| using | validator_type = std::function< bool(const T &)> |
| Descriptive alias for the key validator. More... | |
| using smash::detail::KeyTraits< T >::validator_type = std::function<bool(const T&)> |
Descriptive alias for the key validator.
noexcept specification of a function is part of the function signature but the std::function class template is not specialized on it as new C++23 class templates std::move_only_function or std::copyable_function are. Therefore it is not possible here to add and enforce the noexcept specification in the std::function template argument. Doing so would lead to a compilation error as the generic class template in the STL library is not implemented and it would be selected at instantiation time by the compiler.