Boost logo

Boost :

Subject: [boost] [function] Bind to std::function if supported?
From: Andrew Ho (helloworld922_at_[hidden])
Date: 2013-07-08 14:34:24


The boost::move library binds to std::move/T&&/etc. when the compiler supports
such features, and only uses work-around mechanisms when the compiler lacks
such support.

Should we add similar support for boost::function?

something like:

#ifdef BOOST_FUNCTION_USE_STANDARD_LIBRARY_FUNCTION
// alternative: #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
#include <functional>
namespace boost
{
    using ::std::function;
}
#else
// whatever boost::function currently does
#endif
// ... something similar for boost::bind and std::bind

I haven't looked at boost::atomic yet, but we could also consider similar
bindings to std::atomic if the library doesn't already do so.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk