diff --git a/doc/smart_ptr/enable_shared_from_this.adoc b/doc/smart_ptr/enable_shared_from_this.adoc index 62c16d0..77037d3 100644 --- a/doc/smart_ptr/enable_shared_from_this.adoc +++ b/doc/smart_ptr/enable_shared_from_this.adoc @@ -125,16 +125,14 @@ NOTE: These members throw `bad_weak_ptr` when `*this` is not owned by a `shared_ `weak_this_` is initialized by `shared_ptr` to a copy of itself when it's constructed by a pointer to `*this`. For example, in the following code: ``` -class Y: public boost::enable_shared_from_this -{ -}; +class Y: public boost::enable_shared_from_this {}; int main() { boost::shared_ptr p(new Y); } ``` -the construction of `p` will automatically initialize `p->weak_this_` to `p`. +the construction of `p` will automatically initialize `p\->weak_this_` to `p`. ==== ```