<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>boost/spec/detail/container_should_impl.hpp</filename>
    </added>
    <added>
      <filename>libs/spec/test/spec_test_containers.cpp</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -8,13 +8,14 @@ Done:
     * &quot;should.be_odd()&quot;
 * Add pointer inspection / specification
     * &quot;should.be_null()&quot; and &quot;should.be_not_null()/should.not_be_null()&quot;
+* Add container inspection / specification
+    * &quot;should.contain(instance)&quot; and &quot;should.not_contain()&quot;
+    * &quot;should.be_empty()&quot; and &quot;should.not_be_empty()/should.be_not_empty()&quot;
 
 Missing:
 * Add pointer inspection / specification
     * &quot;should.be_of_type&lt;type&gt;(instance)&quot; and &quot;should.not_be_of_type&lt;type&gt;(instance)&quot;
     * &quot;should.be_derived_from&lt;type&gt;(instance)&quot; and &quot;should.not_be_derived_from&lt;type&gt;(instance)&quot;
 * Add container inspection / specification
-    * &quot;should.be_empty()&quot; and &quot;should.not_be_empty()/should.be_not_empty()&quot;
-    * &quot;should.contain(instance)&quot; and &quot;should.not_contain()&quot;
 * Implement appropriate exception types
 </diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 
 #include &lt;boost/spec/exceptions.hpp&gt;
 #include &lt;boost/spec/detail/should_impl.hpp&gt;
+#include &lt;boost/spec/detail/container_should_impl.hpp&gt;
 #include &lt;boost/type_traits/is_array.hpp&gt;
 #include &lt;boost/type_traits/is_pointer.hpp&gt;
 #include &lt;boost/type_traits/is_same.hpp&gt;
@@ -76,6 +77,20 @@ namespace boost { namespace spec {
         return spec&lt;T&gt;(v);
     };
 
+    template &lt;typename T&gt;
+    struct container_spec {
+        typedef T type;
+        T &amp; container;
+        detail::should_container_impl&lt;T&gt; should, &amp; must;
+
+        explicit container_spec(T &amp; container_) : container(container_), should(container), must(should) { };
+    };
+
+    template &lt;typename T&gt;
+    inline container_spec&lt;T&gt; container(T &amp; c) {
+        return container_spec&lt;T&gt;(c);
+    };
+
 }; // namespace spec
 
 }; // namepsace boost</diff>
      <filename>boost/spec.hpp</filename>
    </modified>
    <modified>
      <diff>@@ -244,6 +244,50 @@ namespace boost { namespace spec {
         };
 
     template &lt;typename T&gt;
+        struct container_does_not_contain : std::exception {
+            explicit container_does_not_contain (T const &amp; value)
+                : _value(value) {
+                    std::ostringstream message(&quot;&quot;);
+                    message &lt;&lt; &quot;spec:: container supplied does not contain value (&quot;
+                        &lt;&lt; _value
+                        &lt;&lt; &quot;).&quot;;
+
+                    _message = message.str();
+                };
+
+            const char * what() const throw () {
+                return _message.c_str();
+            };
+
+            ~container_does_not_contain() throw () { };
+
+            T _value;
+            std::string _message;
+        };
+
+    template &lt;typename T&gt;
+        struct container_contains : std::exception {
+            explicit container_contains (T const &amp; value)
+                : _value(value) {
+                    std::ostringstream message(&quot;&quot;);
+                    message &lt;&lt; &quot;spec:: container supplied contains value (&quot;
+                        &lt;&lt; _value
+                        &lt;&lt; &quot;).&quot;;
+
+                    _message = message.str();
+                };
+
+            const char * what() const throw () {
+                return _message.c_str();
+            };
+
+            ~container_contains() throw () { };
+
+            T _value;
+            std::string _message;
+        };
+
+    template &lt;typename T&gt;
         struct is_null : std::exception {
             explicit is_null(T const &amp; value)
                 : _value(value) {
@@ -287,6 +331,45 @@ namespace boost { namespace spec {
             std::string _message;
         };
 
+    template &lt;typename T&gt;
+        struct container_not_empty : std::exception {
+            typedef T type;
+            explicit container_not_empty()
+                {
+                    std::ostringstream message(&quot;&quot;);
+                    message &lt;&lt; &quot;spec:: container supplied is not empty.&quot;;
+
+                    _message = message.str();
+                };
+
+            const char * what() const throw () {
+                return _message.c_str();
+            };
+
+            ~container_not_empty() throw () { };
+
+            std::string _message;
+        };
+
+    template &lt;typename T&gt;
+        struct container_empty : std::exception {
+            typedef T type;
+            explicit container_empty()
+                {
+                    std::ostringstream message(&quot;&quot;);
+                    message &lt;&lt; &quot;spec:: container supplied is empty.&quot;;
+
+                    _message = message.str();
+                };
+
+            const char * what() const throw () {
+                return _message.c_str();
+            };
+
+            ~container_empty() throw () { };
+
+            std::string _message;
+        };
 }; // namespace spec
 
 }; // namespace boost</diff>
      <filename>boost/spec/exceptions.hpp</filename>
    </modified>
    <modified>
      <diff>@@ -14,3 +14,6 @@ unit-test spec_test : spec_test.cpp
     : &lt;linkflags&gt;-lboost_regex-gcc41
     ;
 
+unit-test spec_test_containers : spec_test_containers.cpp
+    : &lt;linkflags&gt;-lboost_regex-gcc41
+    ;</diff>
      <filename>libs/spec/build/Jamfile.v2</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,6 @@
 // http://www.boost.org/LICENSE_1_0.txt )
 
 #include &lt;boost/spec.hpp&gt;
-#include &lt;vector&gt;
 #include &lt;iostream&gt;
 
 using namespace boost::spec ;</diff>
      <filename>libs/spec/test/spec_test.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1d6a18a9e49634b71067d52e81fa489a02e3c051</id>
    </parent>
  </parents>
  <author>
    <name>Dean Michael Berris</name>
    <email>mikhailberis@gmail.com</email>
  </author>
  <url>http://github.com/mikhailberis/spec-c--/commit/d52d035addf393d6ad9f63e073729536a4300242</url>
  <id>d52d035addf393d6ad9f63e073729536a4300242</id>
  <committed-date>2007-02-23T03:49:54-08:00</committed-date>
  <authored-date>2007-02-23T03:49:54-08:00</authored-date>
  <message>Added support for inspecting containers. See TODO file for more details.</message>
  <tree>c273784cbbfd63c25b51fb5ab5d379fd4d6ec2b5</tree>
  <committer>
    <name>Dean Michael Berris</name>
    <email>mikhailberis@gmail.com</email>
  </committer>
</commit>
