URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic-rref.C] - Rev 693
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>'
}