blob: 743eadaa5dd8239a47adf43a9720eb6879a996a4 [file] [log] [blame]
// PR c++/95728
template<typename T>
void
construct(T* p)
{ ::new(static_cast<void*>(p)) T; } // { dg-error "invalid .static_cast." }
template<typename T>
void
f(const T* t)
{
construct(t);
}
int main()
{
int i[1];
f(i);
}