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:
Format(string formatted)10   explicit Format(string formatted) {}
11   string buffer;
12 };
13 
StrCat(const string & a)14 string StrCat(const string& a) {
15   return "";
16 }
17 
18 template <typename... AV>
Message(string msg,const AV &...args)19 Format Message(string msg, const AV&... args) {
20   return Format::Format(StrCat(msg, args...)); // { dg-error "cannot call constructor" }
21 }
22 
main(int,char **)23 int main(int, char**) {
24   Message("msg");
25 }
26