book: fmt

This commit is contained in:
Changkun Ou
2021-08-11 12:41:48 +02:00
parent 309f1f3731
commit b0f6f30988
2 changed files with 4 additions and 8 deletions

View File

@@ -36,12 +36,10 @@ And return the `std::shared_ptr` pointer of this object type. For example:
```cpp
#include <iostream>
#include <memory>
void foo(std::shared_ptr<int> i)
{
void foo(std::shared_ptr<int> i) {
(*i)++;
}
int main()
{
int main() {
// auto pointer = new int(10); // illegal, no direct assignment
// Constructed a std::shared_ptr
auto pointer = std::make_shared<int>(10);

View File

@@ -38,12 +38,10 @@ order: 5
```cpp
#include <iostream>
#include <memory>
void foo(std::shared_ptr<int> i)
{
void foo(std::shared_ptr<int> i) {
(*i)++;
}
int main()
{
int main() {
// auto pointer = new int(10); // illegal, no direct assignment
// Constructed a std::shared_ptr
auto pointer = std::make_shared<int>(10);