I'm trying to compile a library written with C++11 features using GCC 5.1 on Ubuntu. However, it complains std::unique_ptr
is not defined.
gcc (Ubuntu 5.1.0-0ubuntu11~14.04.1) 5.1.0
g++ (Ubuntu 5.1.0-0ubuntu11~14.04.1) 5.1.0
CXX flags:
-std=c++11 -Wall -Wextra -Weffc++ -pedantic
Output:
error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
std::unique_ptr< detail::RegexImpl > m_pimpl;
However, I'm able to compile the exact same code on OSX.
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
CXX flags:
-stdlib=libc++ -std=c++11 -Wall -Wextra -Weffc++ -pedantic
What am I doing wrong?