adl.hpp 1.3 KB

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