diff --git a/any.md b/any.md index f187342..423219d 100644 --- a/any.md +++ b/any.md @@ -18,6 +18,7 @@ C++17 +
 void * v = ...;
 if (v != nullptr) {
@@ -27,6 +28,7 @@ if (v != nullptr) {
 
+
 std::any v = ...;
 if (v.has_value()) {
@@ -36,6 +38,7 @@ if (v.has_value()) {
 
+
 std::any v = ...;
 if (v.type() == typeid(int)) {
@@ -61,17 +64,17 @@ C++17
 
 
 
+
 
 // can hold Circles, Squares, Triangles,...
 std::vector<Shape *> shapes;
-// requires lots of calls to new
 
+
 // can hold Circles, Squares, Triangles, ints, strings,...
 std::vector<any> things;
-// no calls to new