Replace accidental compound literal syntax in assertion.

The point of the assertion is to provide a type-dependent value that
evaluates to 'false', so that the static_assert will fire on any
instantiation of the template but not on the template itself.

Swift SVN r5176
This commit is contained in:
Jordan Rose
2013-05-16 17:23:31 +00:00
parent f9c4046896
commit 42aa102c23

View File

@@ -327,7 +327,9 @@ public:
/// Look up an operator declaration.
template <typename T>
T *lookupOperator(Identifier name) {
static_assert((T*){}, "Must specify prefix, postfix, or infix operator");
// Make any non-specialized instantiations fail with a "nice" error message.
static_assert(static_cast<T*>(nullptr),
"Must specify prefix, postfix, or infix operator decl");
}
static bool classof(const DeclContext *DC) {