Until OpenMP situation improves C++ ports have to resort to USES=compiler:gcc-c++11-lib. However, libc++ from ports appears to be too old to know about GCC atomic support. $ pkg install -y gcc $ cat >a.cc #include <atomic> int main() { return 0; } $ g++49 -std=c++11 -nostdinc++ -isystem /usr/local/include/c++/v1 a.cc In file included from a.cc:1:0: /usr/local/include/c++/v1/atomic:539:2: error: #error <atomic> is not implemented #error <atomic> is not implemented ^ $ find /usr/local/lib/gcc49 -name '*atomic*' /usr/local/lib/gcc49/include/c++/ext/atomicity.h /usr/local/lib/gcc49/include/c++/atomic /usr/local/lib/gcc49/include/c++/i386-portbld-freebsd11.0/bits/atomic_word.h /usr/local/lib/gcc49/include/c++/bits/atomic_lockfree_defines.h /usr/local/lib/gcc49/include/c++/bits/atomic_base.h /usr/local/lib/gcc49/libatomic.so /usr/local/lib/gcc49/libatomic.so.1.1.0 /usr/local/lib/gcc49/libatomic.a /usr/local/lib/gcc49/libatomic.so.1 /usr/local/lib/gcc49/gcc/i386-portbld-freebsd11.0/4.9.4/include/stdatomic.h https://github.com/llvm-mirror/libcxx/commit/e8b4232e3 https://github.com/llvm-mirror/libcxx/commit/00f4a49b0
libc++ in 10.x base fails like comment 0 but also has the following bug: $ cat >a.cc #include <algorithm> int main() { return 0; } $ g++49 -nostdinc++ -isystem /usr/include/c++/v1 a.cc In file included from /usr/include/c++/v1/algorithm:627:0, from a.cc:1: /usr/include/c++/v1/memory:3768:37: error: default template arguments may not be used in function templates without -std=c++11 or -std=gnu++11 explicit shared_ptr(_Yp* __p); ^ /usr/include/c++/v1/memory:3775:37: error: default template arguments may not be used in function templates without -std=c++11 or -std=gnu++11 shared_ptr(_Yp* __p, _Dp __d); ^ /usr/include/c++/v1/memory:3782:49: error: default template arguments may not be used in function templates without -std=c++11 or -std=gnu++11 shared_ptr(_Yp* __p, _Dp __d, _Alloc __a); ^ /usr/include/c++/v1/memory:3814:37: error: default template arguments may not be used in function templates without -std=c++11 or -std=gnu++11 shared_ptr(auto_ptr<_Yp> __r); ^ /usr/include/c++/v1/memory:3843:83: error: default template arguments may not be used in function templates without -std=c++11 or -std=gnu++11 typename enable_if<!is_lvalue_reference<_Dp>::value, __nat>::type = __nat()); ^ /usr/include/c++/v1/memory:3852:82: error: default template arguments may not be used in function templates without -std=c++11 or -std=gnu++11 typename enable_if<is_lvalue_reference<_Dp>::value, __nat>::type = __nat()); ^
Ah, -std=c++11 is no longer required on FreeBSD 10.3 which is going to be the new oldest supported release since 2017-01-01.