{
x = ctx->object;
/* We don't use cp_build_addr_expr here because we don't want to
- capture the object argument until we've chosen a non-static member
- function. */
+ capture the object argument during constexpr evaluation. */
x = build_address (x);
}
bool lval = false;
(TI_ARGS (tinfo),
TI_ARGS (get_template_info (DECL_TEMPLATE_RESULT (tmpl)))))
{
- error ("template arguments to %qD do not match original"
+ error ("template arguments to %qD do not match original "
"template %qD", decl, DECL_TEMPLATE_RESULT (tmpl));
if (!uses_template_parms (TI_ARGS (tinfo)))
inform (input_location, "use %<template<>%> for"
We also deal with the peculiar case:
template <class T> struct S {
- template <class U> friend void f();
+ template <class U> friend void f();
};
template <class U> void f() {}
template S<int>;
// { dg-do run { target c++14 } }
// { dg-options "-Wall" }
-#include <cassert>
-
struct Class {
Class(void (*_param)()) : data(_param) {}
void (*data)();
void user(Class& c, int i) {
(void)i;
- assert (c.data);
+ if (!c.data) __builtin_abort();
}
void probe() {}