OSDN Git Service

PR c++/44157
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / variadic99.C
1 // PR c++/43054
2 // { dg-options "-std=c++0x" }
3
4 template<typename R> struct future { };
5
6 template<typename Fn, typename... Args>
7  auto
8  async(Fn&& fn, Args&&... args)
9  -> future<decltype(fn(args...))>;
10
11 template<typename Fn, typename... Args>
12  auto
13  async(Fn&& fn, Args&&... args)
14  -> future<decltype(fn(args...))>;
15
16 int work2(int value);
17
18 void work(int value)
19 {
20   async(work2, value);
21 }
22