[Boost.Variant] Is there an r-value version of boost::get for variant?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Boost.Variant] Is there an r-value version of boost::get for variant?

Boost - Users mailing list
As seen in the std docs [1], std::get for variant provides r-value overloads.

Does Boost.Variant have them?

I'm interested in having this overload in particular:

template<typename U, typename T1, typename T2, ..., typename TN> 
  U && get(variant<T1, T2, ..., TN> && operand);

Thanks in advance!



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Boost.Variant] Is there an r-value version of boost::get for variant?

Boost - Users mailing list
2017-05-04 19:40 GMT+03:00 dariomt--- via Boost-users
<[hidden email]>:
> As seen in the std docs [1], std::get for variant provides r-value
> overloads.
>
> Does Boost.Variant have them?
>
> I'm interested in having this overload in particular:
>
> template<typename U, typename T1, typename T2, ..., typename TN>
>   U && get(variant<T1, T2, ..., TN> && operand);

Nope, this overload is missing. Please fill a feature request here
https://svn.boost.org/trac/boost/newticket (do not forget to correctly
specify the component, or the request will be lost for some time).

Or even make a pull request here https://github.com/boostorg/variant
if you fell yourself confident and wish to see your name in the
Boost's changelog for the next release ;)

--
Best regards,
Antony Polukhin
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Boost.Variant] Is there an r-value version of boost::get for variant?

Boost - Users mailing list
Created ticket: https://svn.boost.org/trac/boost/ticket/13018

I might try the PR, but my git-foo is very basic...

2017-05-08 12:57 GMT+02:00 Antony Polukhin <[hidden email]>:
2017-05-04 19:40 GMT+03:00 dariomt--- via Boost-users
<[hidden email]>:
> As seen in the std docs [1], std::get for variant provides r-value
> overloads.
>
> Does Boost.Variant have them?
>
> I'm interested in having this overload in particular:
>
> template<typename U, typename T1, typename T2, ..., typename TN>
>   U && get(variant<T1, T2, ..., TN> && operand);

Nope, this overload is missing. Please fill a feature request here
https://svn.boost.org/trac/boost/newticket (do not forget to correctly
specify the component, or the request will be lost for some time).

Or even make a pull request here https://github.com/boostorg/variant
if you fell yourself confident and wish to see your name in the
Boost's changelog for the next release ;)

--
Best regards,
Antony Polukhin


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users