Fix ASSERT macro under -Wpedantic
This commit is contained in:
parent
470b0c8eb0
commit
6307700710
@ -98,7 +98,7 @@ namespace detail {
|
||||
// this method doesn't do anything and is never called.
|
||||
}
|
||||
|
||||
#define PHONY_USE(E) (nullfn<decltype(E)>())
|
||||
#define PHONY_USE(...) (nullfn<decltype(__VA_ARGS__)>())
|
||||
|
||||
// Work around a compiler warning
|
||||
template<typename T>
|
||||
@ -163,7 +163,7 @@ namespace detail {
|
||||
)
|
||||
#else
|
||||
// Check condition in both debug. std::runtime_error on failure.
|
||||
#define ASSERT(c, ...) PHONY_USE(c)
|
||||
#define ASSERT(...) PHONY_USE(__VA_ARGS__)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user