Commit a2fe3985 by Paolo Carlini Committed by Paolo Carlini

re PR c++/65790 (compilation error : receive std::index_sequence)

2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65790
	* g++.dg/cpp0x/vt-65790.C: New.

From-SVN: r225607
parent e9c9e772
2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65790
* g++.dg/cpp0x/vt-65790.C: New.
2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/66818
......
// PR c++/65790
// { dg-do compile { target c++11 } }
extern "C" int printf(const char* ...);
namespace std
{
typedef decltype(sizeof(0)) size_t;
template<typename _Tp, _Tp... _Idx>
struct integer_sequence
{
typedef _Tp value_type;
static constexpr size_t size() { return sizeof...(_Idx); }
};
template<size_t... _Idx>
using index_sequence = integer_sequence<size_t, _Idx...>;
}
void g(std::size_t a, std::size_t b, std::size_t c)
{
printf("%zu, %zu, %zu\n", a, b, c);
}
template <std::size_t... Seq>
void f(std::index_sequence<Seq...>)
{
g(Seq...);
}
int main()
{
f(std::index_sequence<0, 1, 2>());
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment