| 1 |
// { dg-do compile } |
| 2 |
// { dg-require-effective-target size20plus } |
| 3 |
// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } |
| 4 |
// Origin: Markus Breuer <[email protected]> |
| 5 |
|
| 6 |
// PR c++/6944 |
| 7 |
// Fail to synthesize copy constructor of multi-dimensional |
| 8 |
// array of class. |
| 9 |
|
| 10 |
#include <string> |
| 11 |
|
| 12 |
class Array |
| 13 |
{ |
| 14 |
public: |
| 15 |
std::string m_array[10][20][30]; |
| 16 |
}; |
| 17 |
|
| 18 |
Array func() |
| 19 |
{ |
| 20 |
Array result; |
| 21 |
return result; // sorry, not implemented: cannot initialize multi-dimensional array with initializer |
| 22 |
} |
| 23 |
|
| 24 |
|
| 25 |
int main() |
| 26 |
{ |
| 27 |
Array arr = func(); |
| 28 |
} |
| 29 |
|