[outcome] Purpose of value_type_if_enabled?

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

[outcome] Purpose of value_type_if_enabled?

Boost - Dev mailing list
Are value_type_if_enabled and error_type_if_enabled supposed to be used
by the library users? If so, how?

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [outcome] Purpose of value_type_if_enabled?

Boost - Dev mailing list
On 27/01/2018 17:11, Bjorn Reese via Boost wrote:
> Are value_type_if_enabled and error_type_if_enabled supposed to be used
> by the library users? If so, how?

Purely a "self documenting typedef" there to remind the API reader that
that overload becomes unavailable if there is any ambiguity between
value and error types. This technique lets me avoid SFINAE around the
in_place_type<T> overloads, saving some compile time load.

Niall

--
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost