By the way, is it acceptable to swap structs that have const member(s)?
std.algorithm.swap() used to allow the following code:
----------
struct S
{
const string name;
}
auto a = S("a");
auto b = S("b");
swap(a, b);
assert(a.name == "b";
assert(b.name == "a");
----------
This behavior breaks const correctness, whereas it's sometimes useful
since S doesn't allow built-in assignment. Should swap() disallow it?
Shin
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos