diff --git a/README.md b/README.md index 0b81e7c0..5e487042 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,9 @@ NOTE: This library as of now compiles correctly only with gcc-9.1 and newer. ## Release notes +- 0.3.1 Sep 18, 2019 + - cmcstl2 dependency changed to range-v3 0.9.1 + - 0.3.0 Sep 16, 2019 (CppCon 2019 design) - The design as described on CppCon 2019 talk - Applied the feedback from the Cologne evening session diff --git a/conanfile.py b/conanfile.py index 2b532803..dd976baa 100644 --- a/conanfile.py +++ b/conanfile.py @@ -45,7 +45,7 @@ class UnitsConan(ConanFile): exports = ["LICENSE.md"] settings = "os", "compiler", "build_type", "arch" requires = ( - "cmcstl2/2019.09.09@mpusz/stable" + "range-v3/0.9.1@ericniebler/stable" ) scm = { "type": "git", @@ -82,6 +82,8 @@ class UnitsConan(ConanFile): def package_info(self): self.cpp_info.includedirs = ['include'] + if self.settings.compiler == "gcc": + self.cpp_info.cxxflags = ["-fconcepts"] def package_id(self): self.info.settings.clear() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 034f6510..309bbdf3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,17 +53,20 @@ add_library(units INTERFACE) target_compile_features(units INTERFACE cxx_std_20) target_link_libraries(units INTERFACE - CONAN_PKG::cmcstl2 + CONAN_PKG::range-v3 ) target_include_directories(units INTERFACE $ $ ) -target_compile_options(units - INTERFACE - -Wno-literal-suffix -) +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + target_compile_options(units + INTERFACE + -Wno-literal-suffix + -fconcepts + ) +endif() add_library(mp::units ALIAS units) # installation info diff --git a/src/include/units/bits/hacks.h b/src/include/units/bits/hacks.h index ac68447a..31ed51bd 100644 --- a/src/include/units/bits/hacks.h +++ b/src/include/units/bits/hacks.h @@ -22,7 +22,7 @@ #pragma once -#include +#include #ifdef NDEBUG #define Expects(cond) (void)(cond); @@ -34,10 +34,10 @@ namespace std { // concepts - using experimental::ranges::same_as; - using experimental::ranges::derived_from; - using experimental::ranges::regular; - using experimental::ranges::totally_ordered; - using experimental::ranges::convertible_to; + using concepts::same_as; + using concepts::derived_from; + using concepts::regular; + using concepts::totally_ordered; + using concepts::convertible_to; } diff --git a/test/metabench/CMakeLists.txt b/test/metabench/CMakeLists.txt index d0c4f10a..f54eaba1 100644 --- a/test/metabench/CMakeLists.txt +++ b/test/metabench/CMakeLists.txt @@ -26,7 +26,11 @@ function(add_metabench_test target name erb_path range) target_compile_features(${target} PUBLIC cxx_std_20) target_link_libraries(${target} PUBLIC - CONAN_PKG::cmcstl2 + CONAN_PKG::range-v3 + ) + target_compile_options(${target} + PUBLIC + -fconcepts ) endfunction() diff --git a/test/metabench/make_dimension/hacks.h b/test/metabench/make_dimension/hacks.h index ac68447a..31ed51bd 100644 --- a/test/metabench/make_dimension/hacks.h +++ b/test/metabench/make_dimension/hacks.h @@ -22,7 +22,7 @@ #pragma once -#include +#include #ifdef NDEBUG #define Expects(cond) (void)(cond); @@ -34,10 +34,10 @@ namespace std { // concepts - using experimental::ranges::same_as; - using experimental::ranges::derived_from; - using experimental::ranges::regular; - using experimental::ranges::totally_ordered; - using experimental::ranges::convertible_to; + using concepts::same_as; + using concepts::derived_from; + using concepts::regular; + using concepts::totally_ordered; + using concepts::convertible_to; }