10 Sep
2017
10 Sep
'17
7:07 p.m.
On Sun, Sep 10, 2017 at 1:30 PM, Robert Ramey via Boost wrote:
How do I get ready for C++17?
I have a piece of code which requires C++14. I want to use something from C++17 but I also want my code to work now. So I have
#if C++14 being used namespace std { // implement C++ function }
Don't define those things inside namespace std. Instead: namespace boost { namespace yours { namespace detail { #if /* C++17 thing available */ using std::thing; #else /* Define thing yourself */ #endif } } } And then use boost::yours::detail::thing in your library. Glen