We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4964b04 commit ca1b5a1Copy full SHA for ca1b5a1
spec/importc.dd
@@ -424,8 +424,20 @@ int myprintf(char *, ...) asm("printf");
424
$(H3 $(LNAME2 ctfe, Compile Time Function Execution))
425
426
$(P Evaluating constant expressions includes executing functions in the
427
- same manner as D's CTFE can.)
+ same manner as D's CTFE can.
428
+ A $(I constant-expression) invokes CTFE.)
429
430
+ $(P Examples:)
431
+
432
+$(CCODE
433
+_Static_assert("\x1"[0] == 1, "failed");
434
435
+int mint1() { return -1; }
436
+_Static_assert(mint1() == -1, "failed");
437
438
+const int a = 7;
439
+int b = a; // sets b to 7
440
+)
441
442
$(H3 $(LNAME2 inlining, Function Inlining))
443
0 commit comments