This commit is contained in:
Andrew Pardoe
2016-03-20 17:00:17 -07:00
parent 0269fd5d1f
commit ca0ebb66f6

View File

@@ -9787,7 +9787,7 @@ In the rare cases where the slicing was deliberate the code can be surprising.
class Shape { /* ... */ };
class Circle : public Shape { /* ... */ Point c; int r; };
Circle c {{0,0}, 42};
Circle c { {0,0}, 42};
Shape s {c}; // copy Shape part of Circle
The result will be meaningless because the center and radius will not be copied from `c` into `s`.