URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-function3.C] - Rev 693
Compare with Previous | Blame | View Log
// { dg-do compile }// { dg-options "-std=gnu++0x" }// From N2235// function template 1template<typename T>constexpr int bytesize(T t){ return sizeof (t); } // OKchar buf[bytesize(0)]; // OK -- not C99 VLA// function template 2template<typename _Tp>constexpr _Tpsquare(_Tp x) { return x; }// Explicit specializationtemplate<>constexpr unsigned longsquare(unsigned long x) { return x * x; }// Explicit instantiationtemplate int square(int);class A { };template A square(A);template long square(long);
