[Q] piecewise_construct for boost::container::map::emplace()
5 Apr
2016
5 Apr
'16
4:20 p.m.
I recently tried (but failed) to use boost::container::map::emplace() with the piecewise_construct tag to forward constructor args as tuples. After some fiddling around, it appears that piecewise_construct is not implemented for boost::container::detail::pair (see boost/container/detail/pair.hpp:151). I couldn't find any discussion in the mailing list archives. Is there a good reason not to use emplace() this way, or unreasonable difficulty in implementing piecewise_construct for pair? (I ended up making constructors for my K, V elements that take tuples<>, so emplace() is working for me, but I'm not completely sure that I have avoided all possible copy/move operations. Using gcc-4.9.2, fwiw.) Thanks, dhm
3157
Age (days ago)
3157
Last active (days ago)
0 comments
1 participants
participants (1)
-
dave m.