Boost C++ Libraries: Ticket #12273: boost::container::static_vector max_size() and capacity() should be constant expressions https://svn.boost.org/trac10/ticket/12273 <p> The capacity of a static_vector is a compile time constant. One should be able to retrieve the capacity at compile time as a constant expression. In the current implementation, one must execute a runtime method of either capacity() or max_size() to obtain the capacity. There are use cases where one would want to create another container that has the same capacity as the static_vector will have, so to improve ease of use I would propose adding: </p> <blockquote> <p> BOOST_STATIC_CONSTANT(size_type, capacity = Capacity) BOOST_STATIC_CONSTANT(size_type, max_size = Capacity) </p> </blockquote> <p> following the set of typedefs in the class. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12273 Trac 1.4.3 Ion Gaztañaga Tue, 02 Aug 2016 22:19:41 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12273#comment:1 https://svn.boost.org/trac10/ticket/12273#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the request. Constant "static_capacity" has been added to static_vector/small_vector in commit: </p> <p> <a class="ext-link" href="https://github.com/boostorg/container/commit/4122e722a4b43cfcd8a2b29b3cc02209564b2fbf"><span class="icon">​</span>https://github.com/boostorg/container/commit/4122e722a4b43cfcd8a2b29b3cc02209564b2fbf</a> </p> Ticket jking@… Thu, 17 Nov 2016 13:09:51 GMT <link>https://svn.boost.org/trac10/ticket/12273#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12273#comment:2</guid> <description> <p> According to the pull request this is in the 1.62 tag - the milestone for this issue needs to be updated to indicate that. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 26 Nov 2016 11:32:40 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/12273#comment:3 https://svn.boost.org/trac10/ticket/12273#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.63.0</span> </li> </ul> Ticket anonymous Sat, 26 Nov 2016 11:33:20 GMT milestone changed https://svn.boost.org/trac10/ticket/12273#comment:4 https://svn.boost.org/trac10/ticket/12273#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.63.0</span> → <span class="trac-field-new">Boost 1.62.0</span> </li> </ul> Ticket