is_detected_exact.hpp 796 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. Copyright 2017-2018 Glen Joseph Fernandes
  3. (glenjofe@gmail.com)
  4. Distributed under the Boost Software License,
  5. Version 1.0. (See accompanying file LICENSE_1_0.txt
  6. or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef BOOST_TT_IS_DETECTED_EXACT_HPP_INCLUDED
  9. #define BOOST_TT_IS_DETECTED_EXACT_HPP_INCLUDED
  10. #include <boost/type_traits/detected.hpp>
  11. #include <boost/type_traits/is_same.hpp>
  12. namespace boost {
  13. template<class Expected, template<class...> class Op, class... Args>
  14. using is_detected_exact = is_same<Expected, detected_t<Op, Args...> >;
  15. #if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
  16. template<class Expected, template<class...> class Op, class... Args>
  17. constexpr bool is_detected_exact_v = is_detected_exact<Expected, Op,
  18. Args...>::value;
  19. #endif
  20. } /* boost */
  21. #endif