Remove relational operators from common/offset-type.h
[deliverable/binutils-gdb.git] / gdb / common / offset-type.h
index b480b144067f2588794b444f2f1770fa08743fea..174ad1e45643e38e17892d3c157fb2c194c2789f 100644 (file)
@@ -57,7 +57,7 @@
 /* The macro macro is all you need to know use offset types.  The rest
    below is all implementation detail.  */
 
-/* For each enum class type that you want to support relational
+/* For each enum class type that you want to support arithmetic
    operators, declare an "is_offset_type" overload that has exactly
    one parameter, of type that enum class.  E.g.,:
 
    function via ADL.
 */
 
-#define DEFINE_OFFSET_REL_OP(OP)                                       \
-  template<typename E,                                                 \
-          typename = decltype (is_offset_type (std::declval<E> ()))>   \
-  constexpr bool                                                       \
-  operator OP (E lhs, E rhs)                                           \
-  {                                                                    \
-    using underlying = typename std::underlying_type<E>::type;         \
-    return (static_cast<underlying> (lhs)                              \
-           OP static_cast<underlying> (lhs));                          \
-  }
-
-DEFINE_OFFSET_REL_OP(>)
-DEFINE_OFFSET_REL_OP(>=)
-DEFINE_OFFSET_REL_OP(<)
-DEFINE_OFFSET_REL_OP(<=)
-
 /* Adding or subtracting an integer to an offset type shifts the
    offset.  This is like "PTR = PTR + INT" and "PTR += INT".  */
 
This page took 0.024869 seconds and 4 git commands to generate.