Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/pr69961a.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/69961 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 #include <string> | |
5 | |
6 using std::string; | |
7 | |
8 class Format { | |
9 public: | |
10 explicit Format(string formatted) {} | |
11 string buffer; | |
12 }; | |
13 | |
14 string StrCat(const string& a) { | |
15 return ""; | |
16 } | |
17 | |
18 template <typename... AV> | |
19 Format Message(string msg, const AV&... args) { | |
20 return Format::Format(StrCat(msg, args...)); // { dg-error "cannot call constructor" } | |
21 } | |
22 | |
23 int main(int, char**) { | |
24 Message("msg"); | |
25 } |