diff options
Diffstat (limited to 'gdbsupport')
-rw-r--r-- | gdbsupport/gdb_assert.h | 5 | ||||
-rw-r--r-- | gdbsupport/packed.h | 16 | ||||
-rw-r--r-- | gdbsupport/pathstuff.h | 2 |
3 files changed, 9 insertions, 14 deletions
diff --git a/gdbsupport/gdb_assert.h b/gdbsupport/gdb_assert.h index f399036..e5da39e 100644 --- a/gdbsupport/gdb_assert.h +++ b/gdbsupport/gdb_assert.h @@ -21,11 +21,6 @@ #include "errors.h" -/* A static assertion. This will cause a compile-time error if EXPR, - which must be a compile-time constant, is false. */ - -#define gdb_static_assert(expr) static_assert (expr, "") - /* PRAGMATICS: "gdb_assert.h":gdb_assert() is a lower case (rather than upper case) macro since that provides the closest fit to the existing lower case macro <assert.h>:assert() that it is diff --git a/gdbsupport/packed.h b/gdbsupport/packed.h index c9fcc50..9407b59 100644 --- a/gdbsupport/packed.h +++ b/gdbsupport/packed.h @@ -62,7 +62,7 @@ public: packed (T val) { - gdb_static_assert (sizeof (ULONGEST) >= sizeof (T)); + static_assert (sizeof (ULONGEST) >= sizeof (T)); #if PACKED_USE_ARRAY ULONGEST tmp = val; @@ -76,17 +76,17 @@ public: #endif /* Ensure size and aligment are what we expect. */ - gdb_static_assert (sizeof (packed) == Bytes); - gdb_static_assert (alignof (packed) == 1); + static_assert (sizeof (packed) == Bytes); + static_assert (alignof (packed) == 1); /* Make sure packed can be wrapped with std::atomic. */ #if HAVE_IS_TRIVIALLY_COPYABLE - gdb_static_assert (std::is_trivially_copyable<packed>::value); + static_assert (std::is_trivially_copyable<packed>::value); #endif - gdb_static_assert (std::is_copy_constructible<packed>::value); - gdb_static_assert (std::is_move_constructible<packed>::value); - gdb_static_assert (std::is_copy_assignable<packed>::value); - gdb_static_assert (std::is_move_assignable<packed>::value); + static_assert (std::is_copy_constructible<packed>::value); + static_assert (std::is_move_constructible<packed>::value); + static_assert (std::is_copy_assignable<packed>::value); + static_assert (std::is_move_assignable<packed>::value); } operator T () const noexcept diff --git a/gdbsupport/pathstuff.h b/gdbsupport/pathstuff.h index b22a521..4a0a19e 100644 --- a/gdbsupport/pathstuff.h +++ b/gdbsupport/pathstuff.h @@ -76,7 +76,7 @@ std::string path_join (Args... paths) { /* It doesn't make sense to join less than two paths. */ - gdb_static_assert (sizeof... (Args) >= 2); + static_assert (sizeof... (Args) >= 2); std::array<const char *, sizeof... (Args)> path_array { paths... }; |