1

The C++11 way to separate the parts of a user-defined numeric (integer or floating point) literal with ' as e.g. in 1'500ms stalls parsing for syntax highlighting. I couldn't find anything on the net about this - my new team makes heavy use of this and I am the only Emacs user, so it is me who has to adapt. Is there a way to make the parser for C++ recognize the new syntax without too much hassle? See also: https://en.cppreference.com/w/cpp/language/user_literal

1 Answer 1

0

What version of emacs do you use? I'm not able to reproduce the problem in Emacs 27.1, using this test program:

#include <iostream>
#include <chrono>

int main()
{
    using namespace std::chrono;
    std::chrono::milliseconds t = 1'234ms;
    std::cout << t.count() << '\n';
}
1
  • You are correct. 26.3 didn't yet handle them correctly. Jan 28, 2021 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.