/*! @file Defines `boost::hana::accessors`. @copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_ACCESSORS_HPP #define BOOST_HANA_ACCESSORS_HPP #include #include #include #include namespace boost { namespace hana { template struct accessors_t { #ifndef BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS static_assert(hana::Struct::value, "hana::accessors requires 'S' to be a Struct"); #endif constexpr decltype(auto) operator()() const { using Accessors = BOOST_HANA_DISPATCH_IF(accessors_impl, hana::Struct::value ); return Accessors::apply(); } }; template struct accessors_impl> : default_ { template static constexpr auto apply(Args&& ...) = delete; }; namespace struct_detail { template struct is_valid { static constexpr bool value = true; }; } template struct accessors_impl::value >> : S::hana_accessors_impl { }; }} // end namespace boost::hana #endif // !BOOST_HANA_ACCESSORS_HPP