OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [overload/] [template4.C] - Rev 301

Compare with Previous | Blame | View Log

// PR c++/35986
// { dg-do compile }

namespace
{
  template <int> void foo (...);        // { dg-message "foo" }
  template <int> void bar (int, ...);   // { dg-message "bar" }
  void baz (...);                       // { dg-message "baz" }
}

template <int> void foo (...);          // { dg-message "candidate" }
template <int> void bar (int, ...);     // { dg-message "candidate" }
void baz (...);                         // { dg-message "candidate" }

void
test ()
{
  foo <0> (0);           // { dg-error "is ambiguous" }
  bar <1> (0, 1);       // { dg-error "is ambiguous" }
  baz (0);              // { dg-error "is ambiguous" }
}

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.