Florian Lindner
unread,May 2, 2016, 8:46:16 AM5/2/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to std-dis...@isocpp.org
Hello,
I have this piece of code:
#include <map>
#include <tuple>
class Test {
public:
Test(int a, int b) : _a(a), _b(b) {}
int _a, _b;
};
int main(int argc, char *argv[])
{
std::map<int, Test> map;
map.emplace(0, 1, 2);
return 0;
}
I try to insert a Test object that is initialized with a=1, b=2. The
std::map key should be 0.
However, this does not work like that. I also tried putting 1,2 insert
a make_tuple.
Thanks,
Florian