Skip to content

Commit 72004cd

Browse files
committed
Actually emit constexpr in if constexpr, partially merges #366
1 parent 35fa7f0 commit 72004cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/cppfront.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,10 @@ class cppfront
20012001
assert(n.identifier);
20022002
emit(*n.identifier);
20032003

2004+
if (n.is_constexpr) {
2005+
printer.print_cpp2(" constexpr", n.position());
2006+
}
2007+
20042008
printer.print_cpp2(" (", n.position());
20052009
printer.add_pad_in_this_line(1);
20062010

0 commit comments

Comments
 (0)