Skip to content

Commit

Permalink
Remove BOOST_NO_VOID_RETURNS code path from bind.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 2, 2024
1 parent 645d30d commit 732bc07
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 99 deletions.
56 changes: 1 addition & 55 deletions include/boost/bind/bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ template<class R, class F, class L> class bind_t
}
};

#elif !defined( BOOST_NO_VOID_RETURNS )
#else

template<class R, class F, class L> class bind_t
{
Expand All @@ -1426,61 +1426,7 @@ template<class R, class F, class L> class bind_t

bind_t(F f, L const & l): f_(f), l_(l) {}

#define BOOST_BIND_RETURN return
#include <boost/bind/bind_template.hpp>
#undef BOOST_BIND_RETURN

};

#else // no void returns

template<class R> struct bind_t_generator
{

template<class F, class L> class implementation
{
public:

typedef implementation this_type;

implementation(F f, L const & l): f_(f), l_(l) {}

#define BOOST_BIND_RETURN return
#include <boost/bind/bind_template.hpp>
#undef BOOST_BIND_RETURN

};

};

template<> struct bind_t_generator<void>
{

template<class F, class L> class implementation
{
private:

typedef void R;

public:

typedef implementation this_type;

implementation(F f, L const & l): f_(f), l_(l) {}

#define BOOST_BIND_RETURN
#include <boost/bind/bind_template.hpp>
#undef BOOST_BIND_RETURN

};

};

template<class R2, class F, class L> class bind_t: public bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>
{
public:

bind_t(F f, L const & l): bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>(f, l) {}

};

Expand Down
Loading

0 comments on commit 732bc07

Please sign in to comment.