| 37 | // Compare |
| 38 | template <typename _Tp> |
| 39 | class compare_helper { |
| 40 | template <typename T, typename X = bool> |
| 41 | struct matcher; |
| 42 | |
| 43 | template <typename T> |
| 44 | static constexpr bool match(T *) |
| 45 | { |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | template <typename T> |
| 50 | static constexpr bool match(matcher<T, decltype(std::declval<T>() == std::declval<T>())> *) |
| 51 | { |
| 52 | return true; |
| 53 | } |
| 54 | |
| 55 | public: |
| 56 | static constexpr bool value = match<_Tp>(nullptr); |
| 57 | }; |
| 58 | |
| 59 | template <typename, bool> |
| 60 | struct compare_if; |
nothing calls this directly
no outgoing calls
no test coverage detected