This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error: unable to find numeric literal operator ‘operator"" f’


On 02/13/2014 12:13 PM, Henrik Mannerström wrote:
In his blog, Herb Sutter says it's "Modern C++ style" to use "auto x =
42f;".  When compiling the program below with gcc 4.8.1, I get an error.

int main() {
   auto a = 42f;
   return a;
}

$ g++ -std=gnu++1y -Wall -Wextra -pedantic test.cc
test.cc: In function ‘int main()’:
test.cc:2:12: error: unable to find numeric literal operator ‘operator"" f’
    auto a = 42f;

I think the ""f operator has not been implemented in C++1y mode, either because it's not actually part of the standard or no one has found the time to implement it yet.

--
Florian Weimer / Red Hat Product Security Team


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]