Bryan St. Amour
2017-05-02 16:00:20 UTC
Hello,
C++17 supports a new feature for expanding code conditionally at
compile-time:
int f() {
if constexpr (some-condition) {
// compile if true
}
}
Using the latest snapshot of cc-mode with emacs 24.5.1 on Windows 10,
the code gets indented as follows
if constexpr (true) {
// true case
}
i.e. the indentation level for the block is aligned with the start of
the "constexpr" keyword, instead of with the "if" keyword. Is there
anything I can do to get it to indent properly?
Regards,
Bryan St. Amour
C++17 supports a new feature for expanding code conditionally at
compile-time:
int f() {
if constexpr (some-condition) {
// compile if true
}
}
Using the latest snapshot of cc-mode with emacs 24.5.1 on Windows 10,
the code gets indented as follows
if constexpr (true) {
// true case
}
i.e. the indentation level for the block is aligned with the start of
the "constexpr" keyword, instead of with the "if" keyword. Is there
anything I can do to get it to indent properly?
Regards,
Bryan St. Amour
--
Bryan St. Amour
Slackware is the answer.
What's the question?
Bryan St. Amour
Slackware is the answer.
What's the question?