Hacker News new | ask | show | jobs
by eugene3306 2018 days ago
> How can we replace nested comments?

you may use multiline string literals

1 comments

Care to elaborate on how that's supposed work in practice?
Wow, ugly, but it works:

    (void) R"long-comment(
    /* C-style comment */
    std::cout << "hello" << std::endl;
    )long-comment";
Ugly, confusing, hard to undo, and only works within a function (since it's a statement).