Make the compiler requirement clearer.

* configure.ac: Check for g++ 4.6 bugs, so we catch
the error at compile time, not make time.
* README: Mention the minimal g++ and clang++ versions.
This commit is contained in:
Alexandre Duret-Lutz 2015-02-04 15:55:52 +01:00
parent ee0b8e4ea8
commit 2a3c126c15
2 changed files with 9 additions and 2 deletions

View file

@ -75,6 +75,8 @@ CXXFLAGS="$CXXFLAGS -DSPOT_BUILD"
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody],
[AC_LANG_SOURCE([#include <memory>
#include <string>
#include <chrono> // fails with some installation of clang
#include <map>
template <typename T>
struct check
@ -94,6 +96,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody],
check_type&& cr = static_cast<check_type&&>(c);
auto d = a;
void test_emplace()
{
std::map<int, int> m;
m.emplace(1, 2); // fails with g++ 4.6
}
])])
for f in -std=c++11 '-std=c++11 -stdlib=libc++' -std=c++0x