c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr69961a.C
blobb0c5d41b27c344be89a622a6d24398368bcb2ca9
1 // PR c++/69961
2 // { dg-do compile { target c++11 } }
4 #include <string>
6 using std::string;
8 class Format {
9  public:
10   explicit Format(string formatted) {}
11   string buffer;
14 string StrCat(const string& a) {
15   return "";
18 template <typename... AV>
19 Format Message(string msg, const AV&... args) {
20   return Format::Format(StrCat(msg, args...)); // { dg-error "cannot call constructor" }
23 int main(int, char**) {
24   Message("msg");