1

I'm starting to use C++-17, and one of the new features is if constexpr, which breaks completely the usual if identation:

int main()
{
    if constexpr(true) {
            return 1;
        } else {
        return 0
            };
}

and without the brackets:

int main()
{
    if constexpr(true)
                    return 1;
    else
        return 0;
}

Does anyone knows how to fix it? Even a dirty trick like telling emacs to treat the pattern if constexpr as equivalent to if is enough.

NOTE: I've discover the c-noise-macro-names variable, but I don't know even how to add an element to it (I've tried with add-to-list push, and setq, because it seems that it initially doesn't exist, without success).

ABu
  • 280
  • 1
  • 7

0 Answers0