This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52521] [C++11] user defined literals and order of declaration
- From: "andy at aligature dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Mar 2012 20:06:52 +0000
- Subject: [Bug c++/52521] [C++11] user defined literals and order of declaration
- Auto-submitted: auto-generated
- References: <bug-52521-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52521
--- Comment #8 from Andy Webber <andy at aligature dot com> 2012-03-16 20:06:52 UTC ---
Ah, that fixes it. It could be good to update the release notes to match.
Thanks to Ed Smith-Rowland, G++ now implements C++11 user-defined literals.
// Not actually a good approximation. :)
constexpr long double operator"" _degrees (long double d) { return d * 0.0175;
}
long double pi = 180_degrees;
long double pi = 180.0_degrees;