1378. pair and tuple have too many conversions

Section: 22.3 [pairs] Status: Resolved Submitter: DIN Opened: 2010-08-25 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View all other issues in [pairs].

View all issues with Resolved status.


Addresses DE-15

Several function templates of pair and tuple allow for too many implicit conversions, for example:

#include <tuple>
std::tuple<char*> p(0); // Error?

struct A { explicit A(int){} };
A a = 1; // Error
std::tuple<A> ta = std::make_tuple(1); // OK?

[ Resolution proposed by ballot comment ]

Consider to add wording to constrain these function templates.

[ 2010-10-24 Daniel adds: ]

Accepting n3140 would solve this issue.

Proposed resolution:

See n3140.