Skip to content

Commit e8be6de

Browse files
committed
Use feature test macro to check for 'constexpr' support
1 parent 24205f9 commit e8be6de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/pioasm/c_sdk_output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ struct c_sdk_output : public output_format {
7979
fprintf(out, "#endif\n");
8080
fprintf(out, "\n");
8181

82-
fprintf(out, "#ifdef __cplusplus\n");
82+
fprintf(out, "#ifdef __cpp_constexpr\n");
8383
fprintf(out, "#define PIO_CONST constexpr\n");
8484
fprintf(out, "#else\n");
8585
fprintf(out, "#define PIO_CONST const\n");

0 commit comments

Comments
 (0)