Update item18.md

This commit is contained in:
bz521 2021-01-11 15:11:50 -08:00 committed by GitHub
parent 204cbcc2fa
commit 5e2c6690c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,14 +31,14 @@
```cpp ```cpp
class Investment { ... }; class Investment { ... };
class Sock: public Investment {...}; class Stock: public Investment {...};
class Bond: public Investment {...}; class Bond: public Investment {...};
class RealEstate: public Investment {...}; class RealEstate: public Investment {...};
``` ```
```mermaid ```mermaid
classDiagram classDiagram
Investment <|-- Sock Investment <|-- Stock
Investment <|-- Bond Investment <|-- Bond
Investment <|-- RealEstate Investment <|-- RealEstate
``` ```
@ -121,7 +121,7 @@ makeInvestment(Ts&& params)
```cpp ```cpp
template<typename... Ts> template<typename... Ts>
makeInvestment(Ts&& params) auto makeInvestment(Ts&& params)
{ {
auto delInvmt = [](Investment* pInvestment) auto delInvmt = [](Investment* pInvestment)
{ {