Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / contract / constructor.hpp
index 9dab329..766a7d1 100644 (file)
@@ -29,7 +29,7 @@ Program contracts for constructors.
 This is used to specify postconditions, exception guarantees, old value copies
 at body, and check class invariants for constructors (see
 @RefClass{boost::contract::constructor_precondition} to specify preconditions
-for constructors instead):
+for constructors):
 
 @code
 class u {
@@ -44,7 +44,7 @@ public:
     u(...) {
         boost::contract::old_ptr<old_type> old_var;
         boost::contract::check c = boost::contract::constructor(this)
-            // No `.precondition` (use `constructor_precondition` if needed).
+            // No `.precondition` (use `constructor_precondition` instead).
             .old([&] { // Optional.
                 old_var = BOOST_CONTRACT_OLDOF(old_expr);
                 ...
@@ -84,10 +84,11 @@ postconditions and exception guarantees, within classes that have no invariants.
                 (Usually this template parameter is automatically deduced by C++
                 and it does not need to be explicitly specified by programmers.)
 
-@return The result of this function must be explicitly assigned to a variable of
-        type @RefClass{boost::contract::check} declared locally just before the
-        code of the constructor body (otherwise this library will generate a
-        run-time error, see @RefMacro{BOOST_CONTRACT_ON_MISSING_CHECK_DECL}).
+@return The result of this function must be assigned to a variable of type
+        @RefClass{boost::contract::check} declared explicitly (i.e., without
+        using C++11 @c auto declarations) and locally just before the code of
+        the constructor body (otherwise this library will generate a run-time
+        error, see @RefMacro{BOOST_CONTRACT_ON_MISSING_CHECK_DECL}).
 */
 template<class Class>
 specify_old_postcondition_except<> constructor(Class* obj) {