Debian Codegraph @

gcc/testsuite/g++.dg/template/pr69961a.C

raw
1 // PR c++/69961
2 // { dg-do compile { target c++11 } }
3 // { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
4
5 #include <string>
6
7 using std::string;
8
9 class Format {
10 public:
11 explicit Format(string formatted) {}
12 string buffer;
13 };
14
15 string StrCat(const string& a) {
16 return "";
17 }
18
19 template <typename... AV>
20 Format Message(string msg, const AV&... args) {
21 return Format::Format(StrCat(msg, args...)); // { dg-error "cannot call constructor" }
22 }
23
24 int main(int, char**) {
25 Message("msg");
26 }