| 1 | /*! |
| 2 | @file |
| 3 | Defines `boost::hana::detail::operators::adl`. |
| 4 | |
| 5 | Copyright Louis Dionne 2013-2022 |
| 6 | Distributed under the Boost Software License, Version 1.0. |
| 7 | (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) |
| 8 | */ |
| 9 | |
| 10 | #ifndef BOOST_HANA_DETAIL_OPERATORS_ADL_HPP |
| 11 | #define BOOST_HANA_DETAIL_OPERATORS_ADL_HPP |
| 12 | |
| 13 | #include <boost/hana/config.hpp> |
| 14 | |
| 15 | |
| 16 | namespace boost { namespace hana { namespace detail { namespace operators { |
| 17 | //! @ingroup group-details |
| 18 | //! Enables [ADL](http://en.cppreference.com/w/cpp/language/adl) in the |
| 19 | //! `hana::detail::operators` namespace. |
| 20 | //! |
| 21 | //! This is used by containers in Hana as a quick way to automatically |
| 22 | //! define the operators associated to some concepts, in conjunction |
| 23 | //! with the `detail::xxx_operators` family of metafunctions. |
| 24 | //! |
| 25 | //! Note that `adl` can be passed template arguments to make it unique |
| 26 | //! amongst a set of derived classes. This allows a set of derived classes |
| 27 | //! not to possess a common base class, which would disable the EBO when |
| 28 | //! many of these derived classes are stored in a Hana container. If EBO |
| 29 | //! is not a concern, `adl<>` can simply be used. |
| 30 | template <typename ...> |
| 31 | struct adl { }; |
| 32 | }} }} // end namespace boost::hana |
| 33 | |
| 34 | #endif // !BOOST_HANA_DETAIL_OPERATORS_ADL_HPP |
| 35 | |