URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic-rref.C] - Rev 301
Compare with Previous | Blame | View Log
// { dg-options "-std=c++0x" }
// PR c++/33939
template<typename T>
struct refs_only;
template<typename T>
struct refs_only<T &>
{};
template<typename T>
refs_only<T> foo( T && t)
{
return refs_only<T>();
}
template<typename... T>
struct va_refs_only;
template<typename T>
struct va_refs_only<T>
: refs_only<T>
{};
template<typename... T>
va_refs_only<T...> bar( T &&... t)
{
return va_refs_only<T...>();
}
int main()
{
int j = 0;
foo(j);
bar(j); // error: invalid use of incomplete type 'struct refs_only<int>'
}