You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://github.com/onqtam/doctest
cd doctest
mkdir -p build
cd build
cmake ..
make install
I get compiler errors from the fact, that it tried to compile without setting the -std=c++11 flag.
In file included from /home/tobias/doctest/examples/all_features/main.cpp:2:0:
/home/tobias/doctest/examples/all_features/../../doctest/doctest.h:392:1: error: identifier ‘decltype’ is a keyword in C++11 [-Werror=c++0x-compat]
typedef decltype(nullptr) nullptr_t;
$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Both of the compilers you are using support some (or even most) of C++11, but for them the default std is still 98 - I think that changed for GCC 6 and perhaps a newer clang as well.
So try explicitly setting the standard to C++11 and let me know if it works - I might think of a solution inside of the repository if this is indeed the problem.
When trying to install
doctest
naively like this:I get compiler errors from the fact, that it tried to compile without setting the
-std=c++11
flag.Full output here: https://gist.github.com/Dobiasd/6146ff7ea3ebe0261cbe45b27db0bebd
When I
git checkout tags/1.2.9
instead, it works, but I'd like to upgrade my two libraries (FunctionalPlus, and frugally-deep) to the latest version.My test machine is basically an Ubuntu 16.04:
The compilers are new enough to support C++11:
What is the recommended way to install
doctest
usingcmake
? I was unable to find it in the docs.The text was updated successfully, but these errors were encountered: