File indexing completed on 2025-01-18 09:38:12
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_HISTOGRAM_DETAIL_REPLACE_TYPE_HPP
0008 #define BOOST_HISTOGRAM_DETAIL_REPLACE_TYPE_HPP
0009
0010 #include <boost/core/use_default.hpp>
0011 #include <string>
0012 #include <type_traits>
0013
0014 namespace boost {
0015 namespace histogram {
0016 namespace detail {
0017
0018 template <class T, class From, class To>
0019 using replace_type = std::conditional_t<std::is_same<T, From>::value, To, T>;
0020
0021 template <class T, class Default>
0022 using replace_default = replace_type<T, boost::use_default, Default>;
0023
0024 template <class T>
0025 using replace_cstring = replace_type<T, const char*, std::string>;
0026
0027 }
0028 }
0029 }
0030
0031 #endif