Boost logo

Boost-Commit :

From: asutton_at_[hidden]
Date: 2007-07-22 21:11:32


Author: asutton
Date: 2007-07-22 21:11:31 EDT (Sun, 22 Jul 2007)
New Revision: 7509
URL: http://svn.boost.org/trac/boost/changeset/7509

Log:
Added some more concept text.

Text files modified:
   sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/assignable.qbk | 3 ++-
   sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/copy_constructible.qbk | 37 +++++++++++++++++++++++++++++++++++++
   sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/default_constructible.qbk | 17 ++++++++++++-----
   3 files changed, 51 insertions(+), 6 deletions(-)

Modified: sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/assignable.qbk
==============================================================================
--- sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/assignable.qbk (original)
+++ sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/assignable.qbk 2007-07-22 21:11:31 EDT (Sun, 22 Jul 2007)
@@ -7,7 +7,8 @@
 
 [section Assignable]
 A type `T` is said to be /assignable/ if the value of one instance, `u`, can be copied
-to the value of another, `t`. Note that the type of `u` may be `T` or `const T`.
+to the value of another, `t` through an assignment expression. Note that the type of
+`u` must be `T` or `const T`.
 
 This concept sets no requirements nor makes provision for assignment when the type
 of `u` is not `T` or `const T`. This simply states that instances of a type, that models

Modified: sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/copy_constructible.qbk
==============================================================================
--- sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/copy_constructible.qbk (original)
+++ sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/copy_constructible.qbk 2007-07-22 21:11:31 EDT (Sun, 22 Jul 2007)
@@ -6,5 +6,42 @@
  /]
 
 [section Copy Constructible]
+A type `T` is said to be /copy constructible/ if one instance `t` can be
+constructed with the value of another instance `u`. The type of `u` must
+be `T` or `const T`. A type that is copy constructible has either a
+compiler-generated or user-defined copy constructor.
+
+[heading Notation]
+[table
+ [[Expression] [Description]]
+ [[T] [A copy-constructible type.]]
+ [[t] [An instance of type `T`.]]
+ [[u] [An instance of type 'const T`.]]
+]
+
+[heading Requirements]
+[table
+ [[Expression] [Return Type] [Requirements]]
+ [
+ [`T t(u)`]
+ []
+ [`t` is equivalent to `u`]
+ ]
+ [
+ [`t.~T()`]
+ []
+ [`t` is destructed.]
+ ]
+ [
+ [`&t`]
+ [`T*`]
+ [Denotes the address of `t`.]
+ ]
+]
+
+Taking the address of an instance with `const` type yields a
+`const` pointer. Let `U` be the type `const T` and `u` an instance
+of `U`. The return type of `&u` is `U*`, which by substitution is
+the same as `const T*`.
 
 [endsect]
\ No newline at end of file

Modified: sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/default_constructible.qbk
==============================================================================
--- sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/default_constructible.qbk (original)
+++ sandbox/boost_docs/trunk/libs/standard/doc/concepts/utilities/default_constructible.qbk 2007-07-22 21:11:31 EDT (Sun, 22 Jul 2007)
@@ -7,18 +7,25 @@
 
 [section Default Constructible]
 A type `T` is said to be /default constructible/ if it can be instantiated
-without initializing it to any particular value.
+without initializing it to any particular value. A type with that is default
+constructible has either a compiler-generated or user-defined constructor
+that can be called without arguments.
 
-Some types modeling this concept may choose to define a default value or
-state, but this required.
+Non-trivial default constructors may specify a default value or state for
+an object, but such values are not required by this concept.
 
 [heading Requirements]
 [table
         [[Expression] [Return Type] [Requirements]]
         [
- [`Type `x]
+ [`T x`]
+ []
+ [`x` is an instance of `T`.]
+ ]
+ [
+ [`T()`]
+ [An instance of `T` is constructed.]
                 []
- [`x` is an instance of T.]
         ]
 ]
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk