Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocate member variables with custom allocator #76

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/boost/format/format_class.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <boost/format/internals_fwd.hpp>
#include <boost/format/internals.hpp>
#include <boost/format/alt_sstream.hpp>
#include <boost/core/allocator_access.hpp>

namespace boost {

Expand Down Expand Up @@ -161,8 +162,8 @@ namespace boost {
void make_or_reuse_data(std::size_t nbitems);// used for (re-)initialisation

// member data --------------------------------------------//
std::vector<format_item_t> items_; // each '%..' directive leads to a format_item
std::vector<bool> bound_; // stores which arguments were bound. size() == 0 || num_args
std::vector<format_item_t, typename boost::allocator_rebind<Alloc, format_item_t>::type > items_; // each '%..' directive leads to a format_item
std::vector<bool, typename boost::allocator_rebind<Alloc, bool>::type > bound_; // stores which arguments were bound. size() == 0 || num_args

int style_; // style of format-string : positional or not, etc
int cur_arg_; // keep track of wich argument is current
Expand Down