Skip to content

Commit

Permalink
Actually emit constexpr in if constexpr, partially merges hsutter…
Browse files Browse the repository at this point in the history
  • Loading branch information
hsutter authored and zaucy committed Dec 5, 2023
1 parent d2ce4fb commit 300682d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/cppfront.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2001,6 +2001,10 @@ class cppfront
assert(n.identifier);
emit(*n.identifier);

if (n.is_constexpr) {
printer.print_cpp2(" constexpr", n.position());
}

printer.print_cpp2(" (", n.position());
printer.add_pad_in_this_line(1);

Expand Down

0 comments on commit 300682d

Please sign in to comment.