https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65923

            Bug ID: 65923
           Summary: False positive for warning about literal operator
                    suffix and using
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arnetheduck at gmail dot com
  Target Milestone: ---

In the following snippet, a warning is given when bringing a chrono literal
into the global namespace explicity, but not when importing all literals. Looks
like the warning shouldn't be there, since the two do the same thing, and using
directives are the way to go with literal operators.

cat /tmp/tmp.cc:
#include <chrono>

using std::literals::chrono_literals::operator""s;  // warning here
using std::literals;  // no warning here


/usr/local/gcc49/bin/g++ -c -std=c++14 /tmp/tmp.cc:
/tmp/tmp.cc:4:47: warning: literal operator suffixes not preceded by ‘_’ are
reserved for future standardization
 using std::literals::chrono_literals::operator""s;  // warning here

Reply via email to