Correct __cplusplus where std::tr1::function turns into std::function ?

andrew clarke mail at ozzmosis.com
Wed Nov 29 22:29:02 UTC 2017


On Wed 2017-11-29 13:32:32 UTC-0800, Yuri (yuri at freebsd.org) wrote:

> |This code picks the latter (tr1) version on 11,1-STABLE while the correct
> choice is the former variant. #elif __cplusplus >= 201103L ||
> (defined(_MSC_VER) && _MSC_VER >= 1800) using std::function; #else using
> std::tr1::function; #endif symbols What is the correct __cplusplus then? And
> how to find it for other symbols for future reference? (Googling failed to
> find it.) Thanks! Yuri |

You probably need to enable C++11 support:

clang++ -std=c++11

otherwise clang++ sets __cplusplus to 199711L.


More information about the freebsd-ports mailing list