OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype28.C] - Rev 693

Compare with Previous | Blame | View Log

// PR c++/44175
// { dg-options -std=c++0x }

template <bool, class T> struct enable_if { };
template <class T> struct enable_if <true, T> { typedef T type; };

template <class F, int N>
void ft (F f, typename enable_if<N!=0, int>::type) {}

template< class F, int N >
decltype(ft<F, N-1> (F(), 0))
ft (F f, typename enable_if<N==0, int>::type) {} // { dg-error "depth" }

int main() {
  ft<struct a*, 2> (0, 0);      // { dg-message "from here" }
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.