mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
SFINAE guard on jwt_object's universal reference constructor
This allows the move constructor to be preferred in some cases.
This commit is contained in:
parent
043c8429d4
commit
1b105f4772
2 changed files with 4 additions and 2 deletions
|
@ -290,7 +290,9 @@ jwt_signature::get_verify_algorithm_impl(const jwt_header& hdr) const noexcept
|
||||||
|
|
||||||
//
|
//
|
||||||
template <typename First, typename... Rest>
|
template <typename First, typename... Rest>
|
||||||
jwt_object::jwt_object(First&& first, Rest&&... rest)
|
jwt_object::jwt_object(
|
||||||
|
std::enable_if_t<detail::meta::is_parameter_concept<First>::value, First>&& first,
|
||||||
|
Rest&&... rest)
|
||||||
{
|
{
|
||||||
static_assert (detail::meta::is_parameter_concept<First>::value &&
|
static_assert (detail::meta::is_parameter_concept<First>::value &&
|
||||||
detail::meta::are_all_params<Rest...>::value,
|
detail::meta::are_all_params<Rest...>::value,
|
||||||
|
|
|
@ -889,7 +889,7 @@ public: // 'tors
|
||||||
* to populate header. Not much useful unless JWE is supported.
|
* to populate header. Not much useful unless JWE is supported.
|
||||||
*/
|
*/
|
||||||
template <typename First, typename... Rest>
|
template <typename First, typename... Rest>
|
||||||
jwt_object(First&& first, Rest&&... rest);
|
jwt_object(std::enable_if_t<detail::meta::is_parameter_concept<First>::value, First>&& first, Rest&&... rest);
|
||||||
|
|
||||||
public: // Exposed static APIs
|
public: // Exposed static APIs
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue