This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Value type of map need not be default copyable


On Sat, 4 Aug 2012, Paolo Carlini wrote:

.. note anyway, that only the new testcase was failing, no regressions on pre existing testcases.

What I am seeing is a different testcase (with the same name but in a different directory) failing, because:


  typedef std::pair<const rvalstruct,rvalstruct> V;
  static_assert(std::is_constructible<V, V&&>::value,"too bad");

and it makes sense, since you end up having to construct a rvalstruct from a rvalstruct const&&.

make_pair constructs a pair without const, from which a pair with const is constructible, though I am surprised it doesn't fail somewhere further. I don't know what the right solution is, maybe something emplace-like. In any case, make_pair is unlikely to be right.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]