[Bug c++/51480] non-const default argument gets rejected

2011-12-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51480 --- Comment #4 from Jonathan Wakely 2011-12-09 10:02:52 UTC --- If you think it's useful to modify an object that will never be used, you can do it like this: struct A { }; void accepted(const A &a = A()) { } void rejected(A &a) { } void reje

[Bug c++/51480] non-const default argument gets rejected

2011-12-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51480 --- Comment #3 from Jonathan Wakely 2011-12-09 09:58:12 UTC --- Visual Studio is not a real C++ compiler. Try http://comeaucomputing.com/tryitout/ or http://llvm.org/demo/ Your code is not valid C++, sorry.

[Bug c++/51480] non-const default argument gets rejected

2011-12-09 Thread tho...@maier-komor.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51480 --- Comment #2 from Thomas Maier-Komor 2011-12-09 09:47:06 UTC --- Why is that so? Visual Studio compiler seems to handle that situation without a problem and I think it could come handy in certain situations...

[Bug c++/51480] non-const default argument gets rejected

2011-12-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51480 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|