comparison gcc/testsuite/g++.dg/template/pr69961a.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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 }