view gcc/testsuite/g++.dg/template/pr65390.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/65390
// { dg-do compile }
// { dg-options "" }

template<typename T> struct shared_ptr { };

template<typename T, typename Arg>
shared_ptr<T> make_shared(Arg) { return shared_ptr<T>(); } // { dg-error "variably modified type|trying to instantiate" }

void f(int n){
  make_shared<int[n]>(1); // { dg-error "no matching function" }
}