| 1 | /* Copyright 2016-2017 Joaquin M Lopez Munoz. |
| 2 | * Distributed under the Boost Software License, Version 1.0. |
| 3 | * (See accompanying file LICENSE_1_0.txt or copy at |
| 4 | * http://www.boost.org/LICENSE_1_0.txt) |
| 5 | * |
| 6 | * See http://www.boost.org/libs/poly_collection for library home page. |
| 7 | */ |
| 8 | |
| 9 | #ifndef BOOST_POLY_COLLECTION_DETAIL_IS_NOTHROW_EQ_COMPARABLE_HPP |
| 10 | #define BOOST_POLY_COLLECTION_DETAIL_IS_NOTHROW_EQ_COMPARABLE_HPP |
| 11 | |
| 12 | #if defined(_MSC_VER) |
| 13 | #pragma once |
| 14 | #endif |
| 15 | |
| 16 | #include <boost/poly_collection/detail/is_equality_comparable.hpp> |
| 17 | #include <type_traits> |
| 18 | #include <utility> |
| 19 | |
| 20 | namespace boost{ |
| 21 | |
| 22 | namespace poly_collection{ |
| 23 | |
| 24 | namespace detail{ |
| 25 | |
| 26 | template<typename T,typename=void> |
| 27 | struct is_nothrow_equality_comparable:std::false_type{}; |
| 28 | |
| 29 | template<typename T> |
| 30 | struct is_nothrow_equality_comparable< |
| 31 | T, |
| 32 | typename std::enable_if< |
| 33 | is_equality_comparable<T>::value |
| 34 | >::type |
| 35 | >:std::integral_constant< |
| 36 | bool, |
| 37 | noexcept(std::declval<T>()==std::declval<T>()) |
| 38 | >{}; |
| 39 | |
| 40 | } /* namespace poly_collection::detail */ |
| 41 | |
| 42 | } /* namespace poly_collection */ |
| 43 | |
| 44 | } /* namespace boost */ |
| 45 | |
| 46 | #endif |
| 47 | |