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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// { dg-options "-std=gnu++0x" }
template<typename T>
struct stored_value
{
  explicit stored_value() : value() { }

  explicit stored_value(const T& value) : value(value) { }

  stored_value(int, const T& value) : value(value) { }

  T value;
};

template<typename... Values>
struct myclass : public stored_value<Values>...
{
  myclass() { }

  explicit myclass(const Values&... values)
    : stored_value<Values>(values)... { }

  explicit myclass(int x, const Values&... values)
    : stored_value<Values>(x, values)... { }

};

void f()
{
  int i;
  float f;
  myclass<int*, float*> ifp1;
  myclass<int*, float*> ifp2(&i, &f);
  myclass<int*, float*> ifp3(1, &i, &f);
}

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.