[Bug libstdc++/53657] [4.7/4.8 Regression] [C++11] pair(pair&&) move constructor is non-trivial
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 20 15:05:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53657
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jwakely.gcc at gmail dot
| |com
--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-06-20 15:04:11 UTC ---
If I do the straightforward change (pair(pair&&) defaulted + insert(_Pair&&)
using is_constructible), there are problems in the testsuite for situations
well exemplified by 23_containers/unordered_map/insert/map_range.cc (many
instances in the exception/ testcases too and elsewhere, but hidden below a lot
of templates, grrr): the defaulted pair move constructor is implicitly deleted
and the testcase doesn't compile. Is that expected and the testcase defective?
Maybe yes. We have things like:
typedef std::pair<const std::string, int> Pair;
Pair A = Pair("red", 5);
if I remove the const from Pair it works.
More information about the Gcc-bugs
mailing list