Skip to content

Commit 09d66c7

Browse files
authored
Fix compiler warning (#2956)
``` ./serialize.h:762:49: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions] static_assert(is_serializable_enum<T>::value); ^ , "" ```
1 parent 26bd0d2 commit 09d66c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/serialize.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ template<typename Stream, typename T, typename std::enable_if<std::is_enum<T>::v
748748
inline void Serialize(Stream& s, T a )
749749
{
750750
// If you ever get into this situation, it usaully means you forgot to declare is_serializable_enum for the desired enum type
751-
static_assert(is_serializable_enum<T>::value);
751+
static_assert(is_serializable_enum<T>::value, "Missing declararion of is_serializable_enum");
752752

753753
typedef typename std::underlying_type<T>::type T2;
754754
T2 b = (T2)a;
@@ -759,7 +759,7 @@ template<typename Stream, typename T, typename std::enable_if<std::is_enum<T>::v
759759
inline void Unserialize(Stream& s, T& a )
760760
{
761761
// If you ever get into this situation, it usaully means you forgot to declare is_serializable_enum for the desired enum type
762-
static_assert(is_serializable_enum<T>::value);
762+
static_assert(is_serializable_enum<T>::value, "Missing declararion of is_serializable_enum");
763763

764764
typedef typename std::underlying_type<T>::type T2;
765765
T2 b;

0 commit comments

Comments
 (0)