123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef BOOST_PFR_DETAIL_UNSAFE_DECLVAL_HPP
- #define BOOST_PFR_DETAIL_UNSAFE_DECLVAL_HPP
- #include <boost/pfr/detail/config.hpp>
- #include <type_traits>
- namespace boost { namespace pfr { namespace detail {
- void report_if_you_see_link_error_with_this_function() noexcept;
- template <class T>
- constexpr T unsafe_declval() noexcept {
- report_if_you_see_link_error_with_this_function();
- typename std::remove_reference<T>::type* ptr = 0;
- ptr += 42;
- return static_cast<T>(*ptr);
- }
- }}}
- #endif
|