OpenCores
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 774

Go to most recent revision | 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>'
}

Go to most recent revision | 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.