diff --git a/CMakeLists.txt b/CMakeLists.txt index 951644fc..dfb7c7f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets # ---------------------------------------------------------------- # dependencies -#xo_headeronly_dependency(${SELF_LIB} randomgen) +xo_headeronly_dependency(${SELF_LIB} xo_ratio) # etc.. # end CMakeLists.txt diff --git a/include/xo/unit/dim_util.hpp b/include/xo/unit/dim_util.hpp index 0f84b956..18086f34 100644 --- a/include/xo/unit/dim_util.hpp +++ b/include/xo/unit/dim_util.hpp @@ -2,12 +2,15 @@ #pragma once - -#include "stringliteral.hpp" +//#include "stringliteral.hpp" +//#include "xo/flatstring/flatstring.hpp" +#include namespace xo { namespace unit { enum class dim { + invalid = -1, + /** weight. native unit = 1 gram **/ mass, /** distance. native unit = 1 meter **/ @@ -23,8 +26,13 @@ namespace xo { currency, /** a screen price **/ price, + + /** comes last, counts entries **/ + n_dim }; + static constexpr std::size_t n_dim = static_cast(dim::n_dim); + enum class native_unit_id { gram, meter, @@ -53,6 +61,7 @@ namespace xo { template constexpr auto native_unit_for_v = native_unit_for::value; + } /*namespace unit*/ } /*namespace xo*/