1 // Copyright 2015-2019 Hans Dembinski
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_HISTOGRAM_DETAIL_REPLACE_DEFAULT_HPP
8 #define BOOST_HISTOGRAM_DETAIL_REPLACE_DEFAULT_HPP
10 #include <boost/core/use_default.hpp>
11 #include <type_traits>
17 template <class T, class Default>
18 using replace_default =
19 std::conditional_t<std::is_same<T, boost::use_default>::value, Default, T>;
22 } // namespace histogram