diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f8c67ef9a..ec231a2edb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,7 @@ if(WITH_STL) add_definitions(-DHAVE_CPP_STDLIB) add_definitions(-DHAVE_GSL) # Require at least C++17. C++20 is needed to avoid gsl::span - if(CMAKE_VERSION VERSION_GREATER 3.18.0) + if(CMAKE_VERSION VERSION_GREATER 3.11.999) # Ask for 20, may get anything below set(CMAKE_CXX_STANDARD 20) else() diff --git a/api/include/opentelemetry/std/variant.h b/api/include/opentelemetry/std/variant.h index 00cd99cc57..cb696ab397 100644 --- a/api/include/opentelemetry/std/variant.h +++ b/api/include/opentelemetry/std/variant.h @@ -140,6 +140,7 @@ constexpr auto visit(_Callable &&_Obj, _Variants &&... _Args) }; #else +using std::bad_variant_access; template constexpr std::variant_alternative_t> &get(std::variant &v) diff --git a/api/test/nostd/string_view_test.cc b/api/test/nostd/string_view_test.cc index d5c7fe4fdd..fc580debc1 100644 --- a/api/test/nostd/string_view_test.cc +++ b/api/test/nostd/string_view_test.cc @@ -4,7 +4,7 @@ #include "opentelemetry/nostd/string_view.h" #include - +#include #include using opentelemetry::nostd::string_view;