diff --git a/conanfile.py b/conanfile.py index 8d1fe106..aa012bae 100644 --- a/conanfile.py +++ b/conanfile.py @@ -52,7 +52,7 @@ class UnitsConan(ConanFile): "downcast": ["off", "on", "auto"] } default_options = { - "downcast": "auto" + "downcast": "on" } exports = ["LICENSE.md"] exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"] diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 461314cf..3dd4a831 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,7 @@ project(mp-units LANGUAGES CXX ) -set(DOWNCAST_MODE AUTO CACHE STRING "Select downcasting mode") +set(DOWNCAST_MODE ON CACHE STRING "Select downcasting mode") set_property(CACHE DOWNCAST_MODE PROPERTY STRINGS AUTO ON OFF) # set path to custom cmake modules diff --git a/src/include/units/bits/external/downcasting.h b/src/include/units/bits/external/downcasting.h index a5cb1fa4..0f7d65c7 100644 --- a/src/include/units/bits/external/downcasting.h +++ b/src/include/units/bits/external/downcasting.h @@ -30,7 +30,7 @@ #error "Invalid DOWNCAST_MODE value" #endif #else -#define DOWNCAST_MODE 2 +#define DOWNCAST_MODE 1 #endif namespace units {