Skip to content

Commit b75cf19

Browse files
authored
Merge pull request #2223 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master)
2 parents 878f748 + 9673b2b commit b75cf19

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

docs/cpp/how-to-create-and-use-shared-ptr-instances.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The following example shows how to declare and initialize `shared_ptr` instances
7878
7979
## Example 3
8080
81-
`shared_ptr` is also helpful in C++ Standard Library containers when you're using algorithms that copy elements. You can wrap elements in a `shared_ptr`, and then copy it into other containers with the understanding that the underlying memory is valid as long as you need it, and no longer. The following example shows how to use the `replace_copy_if` algorithm on `shared_ptr` instances in a vector.
81+
`shared_ptr` is also helpful in C++ Standard Library containers when you're using algorithms that copy elements. You can wrap elements in a `shared_ptr`, and then copy it into other containers with the understanding that the underlying memory is valid as long as you need it, and no longer. The following example shows how to use the `remove_copy_if` algorithm on `shared_ptr` instances in a vector.
8282
8383
[!code-cpp[stl_smart_pointers#4](../cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_3.cpp)]
8484

docs/cpp/namespaces-cpp.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,14 @@ Members of a named namespace can be defined outside the namespace in which they
9595
// defining_namespace_members.cpp
9696
// C2039 expected
9797
namespace V {
98-
void f();
99-
}
98+
void f();
99+
}
100100
101-
void V::f() { } // ok
102-
void V::g() { } // C2039, g() is not yet a member of V
101+
void V::f() { } // ok
102+
void V::g() { } // C2039, g() is not yet a member of V
103103
104-
namespace V {
105-
void g();
106-
}
104+
namespace V {
105+
void g();
107106
}
108107
```
109108

@@ -258,4 +257,4 @@ This is called an unnamed or anonymous namespace and it is useful when you want
258257

259258
## See also
260259

261-
[Declarations and Definitions](declarations-and-definitions-cpp.md)
260+
[Declarations and Definitions](declarations-and-definitions-cpp.md)

0 commit comments

Comments
 (0)