http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61057

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |emsr at gcc dot gnu.org

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

class Int {
public:
    constexpr Int(long long unsigned value)
        : m_value(value)
    {}
    const long long unsigned m_value;
};

constexpr Int operator "" _i(long long unsigned i) {
    return Int(i);
}

auto x = 1_i.m_value;

I think G++ is correct, the grammar in the standard defines 1_i.m_value as a
pp-number, i.e. a single preprocessing token, which is treated as a literal, so
_i.m_value is looked up as the suffix.

Clang gives the same error.

Reply via email to