aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/packed.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-10-18 20:44:11 -0600
committerTom Tromey <tom@tromey.com>2023-11-29 14:29:44 -0700
commit69f6730df3d18216126283864246eaf538bdf91d (patch)
treee17002e214e8d6d2ea423575e29b56f90005b778 /gdbsupport/packed.h
parentd02f31bb130fd54fa2891cbc28fbc01f603eca6c (diff)
downloadgdb-69f6730df3d18216126283864246eaf538bdf91d.zip
gdb-69f6730df3d18216126283864246eaf538bdf91d.tar.gz
gdb-69f6730df3d18216126283864246eaf538bdf91d.tar.bz2
Remove gdb_static_assert
C++17 makes the second parameter to static_assert optional, so we can remove gdb_static_assert now.
Diffstat (limited to 'gdbsupport/packed.h')
-rw-r--r--gdbsupport/packed.h16
1 files changed, 8 insertions, 8 deletions
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