Merge pull request #35 from mhfrantz/issue-33/move-semantics.v1

issue-33: Add test showing how to invoke move ctor
This commit is contained in:
Arun Muralidharan 2018-11-02 22:34:22 +05:30 committed by GitHub
commit fe2e06141f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 2 deletions

View file

@ -290,7 +290,9 @@ jwt_signature::get_verify_algorithm_impl(const jwt_header& hdr) const noexcept
//
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 &&
detail::meta::are_all_params<Rest...>::value,

View file

@ -889,7 +889,7 @@ public: // 'tors
* to populate header. Not much useful unless JWE is supported.
*/
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
/**