is_not_like.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * https://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * Copyright (c) 2023 Andrey Semashev
  7. */
  8. /*!
  9. * \file scope/detail/is_not_like.hpp
  10. *
  11. * This header contains definition of \c is_not_like type trait.
  12. */
  13. #ifndef BOOST_SCOPE_DETAIL_IS_NOT_LIKE_HPP_INCLUDED_
  14. #define BOOST_SCOPE_DETAIL_IS_NOT_LIKE_HPP_INCLUDED_
  15. #include <type_traits>
  16. #include <boost/scope/detail/config.hpp>
  17. #include <boost/scope/detail/header.hpp>
  18. #ifdef BOOST_HAS_PRAGMA_ONCE
  19. #pragma once
  20. #endif
  21. namespace boost {
  22. namespace scope {
  23. namespace detail {
  24. //! The type trait checks if \c T is not a possibly cv-reference-qualified specialization of \c Template
  25. template< typename T, template< typename... > class Template >
  26. struct is_not_like : public std::true_type { };
  27. template< typename T, template< typename... > class Template >
  28. struct is_not_like< T&, Template > : public is_not_like< T, Template > { };
  29. template< template< typename... > class Template, typename... Ts >
  30. struct is_not_like< Template< Ts... >, Template > : public std::false_type { };
  31. template< template< typename... > class Template, typename... Ts >
  32. struct is_not_like< const Template< Ts... >, Template > : public std::false_type { };
  33. template< template< typename... > class Template, typename... Ts >
  34. struct is_not_like< volatile Template< Ts... >, Template > : public std::false_type { };
  35. template< template< typename... > class Template, typename... Ts >
  36. struct is_not_like< const volatile Template< Ts... >, Template > : public std::false_type { };
  37. } // namespace detail
  38. } // namespace scope
  39. } // namespace boost
  40. #include <boost/scope/detail/footer.hpp>
  41. #endif // BOOST_SCOPE_DETAIL_IS_NOT_LIKE_HPP_INCLUDED_