diff --git a/doc/17_gotchas.qbk b/doc/17_gotchas.qbk index 5cfa36b..5e5926e 100644 --- a/doc/17_gotchas.qbk +++ b/doc/17_gotchas.qbk @@ -61,12 +61,12 @@ When an optional object that contains a value is moved from (is a source of move assert (opi); assert (*opi == nullptr); -Quite a lot of people expect that when an object that contains a value is moved from, its contained value should be destroyed. This is not so, for performance reasons. Current semantics allow the implementation of `boost::opiotnal` to be trivially copyable when `T` is trivial. +Quite a lot of people expect that when an object that contains a value is moved from, its contained value should be destroyed. This is not so, for performance reasons. Current semantics allow the implementation of `boost::optional` to be trivially copyable when `T` is trivial. [endsect] [section Mixed relational comparisons] -Because `T` is convertible to `optional` and because `opiotnal` is __SGI_LESS_THAN_COMPARABLE__ when `T` is __SGI_LESS_THAN_COMPARABLE__, +Because `T` is convertible to `optional` and because `optional` is __SGI_LESS_THAN_COMPARABLE__ when `T` is __SGI_LESS_THAN_COMPARABLE__, you can sometimes get an unexpected runtime result where you would rather expect a compiler error: optional Flight_plan::weight(); // sometimes no weight can be returned @@ -108,4 +108,4 @@ This is obviously redundant, but makes the warning disappear. [endsect] -[endsect] \ No newline at end of file +[endsect]