forked from boostorg/function
The void partial specialization of the function classes has been removed in
favor of a common interface. Regardless of the compiler's capabilities, the result type of a Boost.Function function object that was declared void will be "unused". This allows the result of a Boost.Function function object to be passed as a parameter regardless of whether the function is declared as returning void. It greatly simplifies the use of Boost.Function objects with wrapper objects (i.e., when the side effects are important, but the result isn't: consider binding and composition when calling a std::for_each loop) [SVN r10491]
This commit is contained in:
@ -103,13 +103,11 @@ namespace boost {
|
||||
*/
|
||||
template<typename T> struct function_return_type { typedef T type; };
|
||||
|
||||
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template<>
|
||||
struct function_return_type<void>
|
||||
{
|
||||
typedef unusable type;
|
||||
};
|
||||
#endif /* BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION */
|
||||
|
||||
// The operation type to perform on the given functor/function pointer
|
||||
enum functor_manager_operation_type { clone_functor, destroy_functor };
|
||||
|
Reference in New Issue
Block a user