123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #ifndef BOOST_HISTOGRAM_WEIGHT_HPP
- #define BOOST_HISTOGRAM_WEIGHT_HPP
- #include <utility>
- namespace boost {
- namespace histogram {
- template <class T>
- struct weight_type {
-
- T value;
-
- template <class U>
- operator weight_type<U>() const {
- return weight_type<U>{static_cast<U>(value)};
- }
- };
- template <class T>
- auto weight(T&& t) noexcept {
- return weight_type<T>{std::forward<T>(t)};
- }
- }
- }
- #endif
|