aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/common/offset-type.h18
2 files changed, 6 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 51ba04d..0207bec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
+ Adjust comments.
+
2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* procfs.c: Include common/pathstuff.h.
diff --git a/gdb/common/offset-type.h b/gdb/common/offset-type.h
index b480b14..174ad1e 100644
--- a/gdb/common/offset-type.h
+++ b/gdb/common/offset-type.h
@@ -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.,:
@@ -73,22 +73,6 @@
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". */