Skip to content

Commit 4ec17af

Browse files
committed
perlhacktips: document our usage of C99 bool
Since commit b1c011d we unconditionally include <stdbool.h> and assume C99 booleans are available, so document the feature in perlhacktips.
1 parent 8c5e6c3 commit 4ec17af

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pod/perlhacktips.pod

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ everywhere. It's fine to probe for additional C99 features and use
128128
them where available, providing there is also a fallback for compilers
129129
that don't support the feature. For example, we use C11 thread local
130130
storage when available, but fall back to POSIX thread specific APIs
131-
otherwise, and we use C<char> for booleans if C<< <stdbool.h> >> isn't
132-
available.
131+
otherwise.
133132

134133
Code can use (and rely on) the following C99 features being present
135134

@@ -233,6 +232,13 @@ C<//> comments
233232
All compilers we tested support their use. Not all humans we tested
234233
support their use.
235234

235+
=item *
236+
237+
booleans
238+
239+
You can use C<bool>, C<true>, and C<false> as provided by C<< <stdbool.h >>
240+
(or natively in C++).
241+
236242
=back
237243

238244
Code explicitly should not use any other C99 features. For example

0 commit comments

Comments
 (0)