$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r82366 - in sandbox/static_vector: boost/container doc example
From: athundt_at_[hidden]
Date: 2013-01-05 16:21:50
Author: ahundt
Date: 2013-01-05 16:21:49 EST (Sat, 05 Jan 2013)
New Revision: 82366
URL: http://svn.boost.org/trac/boost/changeset/82366
Log:
added some static_vector documentation
Text files modified: 
   sandbox/static_vector/boost/container/static_vector.hpp     |     7 +++++++                                 
   sandbox/static_vector/doc/static_vector.qbk                 |    13 ++++++++++++-                           
   sandbox/static_vector/example/bench_static_vector.cpp       |    19 ++++++++++++++++---                     
   sandbox/static_vector/example/static_vector_example.cpp     |     2 +-                                      
   sandbox/static_vector/example/static_vector_set_example.cpp |     2 +-                                      
   5 files changed, 37 insertions(+), 6 deletions(-)
Modified: sandbox/static_vector/boost/container/static_vector.hpp
==============================================================================
--- sandbox/static_vector/boost/container/static_vector.hpp	(original)
+++ sandbox/static_vector/boost/container/static_vector.hpp	2013-01-05 16:21:49 EST (Sat, 05 Jan 2013)
@@ -153,6 +153,13 @@
 
 } // namespace static_vector_detail
 
+/// A hybrid of boost::container::vector and boost::array. 
+/**
+ * static_vector is a sequence container like boost::container::vector with contiguous storage that can
+ * change in size, but provides the static allocation, low overhead, and fixed capacity of boost::array.
+ *
+ * 
+ */
 template <typename Value, std::size_t Capacity, typename Strategy/*FakeAllocator*/ = static_vector_detail::default_strategy<Value>/*fake_allocator*/ >
 class static_vector
 {
Modified: sandbox/static_vector/doc/static_vector.qbk
==============================================================================
--- sandbox/static_vector/doc/static_vector.qbk	(original)
+++ sandbox/static_vector/doc/static_vector.qbk	2013-01-05 16:21:49 EST (Sat, 05 Jan 2013)
@@ -1,5 +1,6 @@
 [/
  / Copyright (c) 2012 Adam Wulkiewicz
+ / Copyright (c) 2012 Andrew Hundt
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,7 +22,17 @@
 
 [section:static_vector static_vector]
 
-Description.
+static_vector is a hybrid of boost::container::vector and boost::array. 
+
+static_vector is a sequence container like boost::container::vector with contiguous storage that can
+change in size, but provides the static allocation, low overhead, and fixed capacity of boost::array.
+
+<Insert example here>
+
+static_vector is well suited for use in a buffer or in the internal implementation of of other classes, or use cases where there is a fixed limit to the number of elements that must be stored. Embedded and realtime applications are a particular case where static_vector is most useful, where allocation either may not be available or acceptable. 
+
+Exceptions can be disabled for cases where it is not supported or not desired.
+
 
 [endsect]
 
Modified: sandbox/static_vector/example/bench_static_vector.cpp
==============================================================================
--- sandbox/static_vector/example/bench_static_vector.cpp	(original)
+++ sandbox/static_vector/example/bench_static_vector.cpp	2013-01-05 16:21:49 EST (Sat, 05 Jan 2013)
@@ -1,9 +1,22 @@
 
 // benchmark based on: http://cpp-next.com/archive/2010/10/howards-stl-move-semantics-benchmark/
-
+/**
+ *  @file   static_vector_set_example.cpp
+ *  @date   Aug 14, 2011
+ *  @author Andrew Hundt <ATHundt_at_[hidden]>
+ *
+ *  (C) 2011-2012 Andrew Hundt <ATHundt_at_[hidden]>
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See
+ *  accompanying file LICENSE_1_0.txt or copy at
+ *  http://www.boost.org/LICENSE_1_0.txt)
+ *
+ *  @brief  static_vector_benchmark.cpp compares the performance of boost::container::static_vector to boost::container::vector
+ *
+ */
+ 
 #include "boost/container/static_vector.hpp"
 #include "boost/container/vector.hpp"
-#include "boost/container/set.hpp"
 #include <vector>
 #include <iostream>
 #include <boost/timer/timer.hpp>
@@ -15,7 +28,7 @@
 using boost::timer::cpu_times;
 using boost::timer::nanosecond_type;
 
-static const std::size_t N = 720;
+static const std::size_t N = 720; // note: if N is too large you will run out of stack space. It is possible to increase the stack limit on some platforms.
 
 extern bool some_test;
 
Modified: sandbox/static_vector/example/static_vector_example.cpp
==============================================================================
--- sandbox/static_vector/example/static_vector_example.cpp	(original)
+++ sandbox/static_vector/example/static_vector_example.cpp	2013-01-05 16:21:49 EST (Sat, 05 Jan 2013)
@@ -3,7 +3,7 @@
  *  @date   Aug 14, 2011
  *  @author Andrew Hundt <ATHundt_at_[hidden]>
  *
- *  (C) Andrew Hundt 2011-2012 <ATHundt_at_[hidden]>
+ *  (C) 2011-2012 Andrew Hundt <ATHundt_at_[hidden]>
  *
  *  Distributed under the Boost Software License, Version 1.0. (See
  *  accompanying file LICENSE_1_0.txt or copy at
Modified: sandbox/static_vector/example/static_vector_set_example.cpp
==============================================================================
--- sandbox/static_vector/example/static_vector_set_example.cpp	(original)
+++ sandbox/static_vector/example/static_vector_set_example.cpp	2013-01-05 16:21:49 EST (Sat, 05 Jan 2013)
@@ -3,7 +3,7 @@
  *  @date   Aug 14, 2011
  *  @author Andrew Hundt <ATHundt_at_[hidden]>
  *
- *  (C) Andrew Hundt 2011 <ATHundt_at_[hidden]>
+ *  (C) 2011-2012 Andrew Hundt <ATHundt_at_[hidden]>
  *
  *  Distributed under the Boost Software License, Version 1.0. (See
  *  accompanying file LICENSE_1_0.txt or copy at