12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef BOOST_PFR_DETAIL_UNSAFE_DECLVAL_HPP
- #define BOOST_PFR_DETAIL_UNSAFE_DECLVAL_HPP
- #pragma once
- #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 = nullptr;
- ptr += 42;
- return static_cast<T>(*ptr);
- }
- }}}
- #endif
|