This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

1423. map constructor accepting an allocator as single parameter should be explicit

Section: 24.4.4 [map] Status: C++11 Submitter: Japan Opened: 2010-08-25 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [map].

View all issues with C++11 status.

Discussion:

Addresses JP-6

Constructor accepting an allocator as a single parameter should be qualified as explicit.

namespace std {
template <class Key, class T, class Compare =
less<Key>,
class Allocator = allocator<pair<const Key, T> > >
class map {
public:
...
map(const Allocator&);

[ Resolved in Rapperswil by a motion to directly apply the words from the ballot comment in N3102. ]

Proposed resolution:

Add explicit.

namespace std {
template <class Key, class T, class Compare =
less<Key>,
class Allocator = allocator<pair<const Key, T> > >
class map {
public:
...
explicit map(const Allocator&);