benchmark: [BUG] requirement of C++11 is incompatible with Google Test

Google Benchmark insists on being compiled with the standard not exceeding C++11 https://github.com/google/benchmark/blob/974cd5a5c5a78e76ebc50961f4dbf3bf6d4ade4e/CMakeLists.txt#L174

At the same time, Google Benchmark requires Google Test, which is incompatible with C++11 https://github.com/google/googletest/blob/5b909beeec178f338be997830b6c31a80cda7a93/googletest/include/gtest/internal/gtest-internal.h#L635

  typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;

std::less without template parameters doesn’t compile in C++11.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 42 (16 by maintainers)

Commits related to this issue

Most upvoted comments

i believe this is resolved by #1468

we’re not able to take advantage of modern CMake functionality because we need to support older platforms

You should check your answers against simple, verifiable facts. Google Benchmark’s CMakeLists.txt requires CMake 3.5. CXX_STANDARD is available in CMake 3.5. See: https://cmake.org/cmake/help/v3.5/prop_tgt/CXX_STANDARD.html