Title
vector<bool> is missing emplace and emplace_back member functions
Status
c++14
Section
[vector.bool]
Submitter
Nevin Liber

Created on 2012-09-21.00:00:00 last changed 131 months ago

Messages

Date: 2013-04-19.22:36:19

Proposed resolution:

This wording is relative to N3376.

  1. Change the class template vector<bool> synopsis, [vector.bool] p1, as indicated:

    namespace std {
      template <class Allocator> class vector<bool, Allocator> {
      public:
        […]
        // modifiers:
        template <class... Args> void emplace_back(Args&&... args);
        void push_back(const bool& x);
        void pop_back();
        template <class... Args> iterator emplace(const_iterator position, Args&&... args);
        iterator insert(const_iterator position, const bool& x);
        […]
      };
    }
    
Date: 2013-04-20.00:00:00

[ 2013-04-20 Bristol ]

Date: 2012-10-20.00:32:14

[ 2012, Portland: Move to Tentatively Ready ]

Question on whether the variadic template is really needed, but it turns out to be needed to support emplace of no arguments.

Date: 2012-09-21.00:00:00

It should have them so that it more closely matches the vector<T> interface, as this helps when writing generic code.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-04-25 19:07:07adminsetstatus: voting -> wp
2013-04-19 22:36:19adminsetmessages: + msg6484
2013-04-19 22:36:19adminsetstatus: ready -> voting
2012-10-20 00:32:14adminsetmessages: + msg6197
2012-10-20 00:32:14adminsetstatus: new -> ready
2012-09-23 21:51:48adminsetmessages: + msg6141
2012-09-21 00:00:00admincreate