This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52485] [c++11] add an option to disable c++11 user-defined literals
- From: "eu at doxos dot eu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Mar 2012 08:55:12 +0000
- Subject: [Bug c++/52485] [c++11] add an option to disable c++11 user-defined literals
- Auto-submitted: auto-generated
- References: <bug-52485-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52485
--- Comment #2 from VÃclav Åmilauer <eu at doxos dot eu> 2012-03-05 08:55:12 UTC ---
(In reply to comment #1)
> I think we should not have an option to disable user-defined literals at all.
> Since their code is not C++11, they should fix their code to be C++11 if they
> use the -std=c++11/-std++0x option.
You were right in an ideal world. OTOH it is a point where c++11 breaks
backward-compatibility with legal c++03 code; therefore, as an interim solution
before "they" fix "their" code (think how long does it take before Qt fixes
their code and the fixes come downstream? A year?), optinally disabling this
feature would be useful.
The fix is always putting some extra spaces in macro definitions; it can (will)
be hacked around on a case-by-case basis and that is ugly.