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 19:23:18 +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
Andy Webber <andy at aligature dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andy at aligature dot com
--- Comment #6 from Andy Webber <andy at aligature dot com> 2012-03-16 19:23:18 UTC ---
I've been playing around with a gcc 4.7.0 RC2 build and it seems like the user
defined literals might not be working at all now.
Building:
#include <iostream>
#include <cstdlib>
constexpr long double operator"" _degrees(long double d)
{
return d * 0.0175;
}
int main()
{
long double pi = 180_degrees;
std::cout << pi << std::endl;
}
Result:
literal.cpp: In function âint main()â:
literal.cpp:11:21: error: unable to find numeric literal operator âoperator""
_degreesâ