@@ -244,6 +244,26 @@ class default_next_capacity;
244244
245245typedef vector_opt<void , void > vector_null_opt;
246246
247+ template <class GrowthType , class StoredSizeType >
248+ struct string_opt
249+ {
250+ typedef GrowthType growth_factor_type;
251+ typedef StoredSizeType stored_size_type;
252+
253+ template <class AllocTraits >
254+ struct get_stored_size_type
255+ : get_stored_size_type_with_alloctraits<AllocTraits, StoredSizeType>
256+ {};
257+ };
258+
259+ typedef string_opt<void , void > string_null_opt;
260+
261+ struct growth_factor_50 ;
262+
263+ struct growth_factor_60 ;
264+
265+ struct growth_factor_100 ;
266+
247267#else
248268
249269// !This growth factor argument specifies that the container should increase its
@@ -674,6 +694,40 @@ using deque_options_t = typename boost::container::deque_options<Options...>::ty
674694
675695#endif
676696
697+ // ! Helper metafunction to combine options into a single type to be used
698+ // ! by \c boost::container::string.
699+ // ! Supported options are: \c boost::container::growth_factor and \c boost::container::stored_size
700+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
701+ template <class ...Options>
702+ #else
703+ template <class O1 = void , class O2 = void , class O3 = void , class O4 = void >
704+ #endif
705+ struct string_options
706+ {
707+ // / @cond
708+ typedef typename ::boost::intrusive::pack_options
709+ < string_null_opt,
710+ #if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
711+ O1, O2, O3, O4
712+ #else
713+ Options...
714+ #endif
715+ >::type packed_options;
716+ typedef string_opt< typename packed_options::growth_factor_type
717+ , typename packed_options::stored_size_type> implementation_defined;
718+ // / @endcond
719+ typedef implementation_defined type;
720+ };
721+
722+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
723+
724+ // ! Helper alias metafunction to combine options into a single type to be used
725+ // ! by \c boost::container::string.
726+ template <class ...Options>
727+ using string_options_t = typename boost::container::string_options<Options...>::type;
728+
729+ #endif
730+
677731// !This option specifies the maximum size of a block in bytes: this delimites the number of contiguous elements
678732// !that will be allocated by some containers as min(1u, BlockBytes/sizeof(value_type))
679733// !A value zero represents the default value.
0 commit comments