Skip to content

Commit e7a8320

Browse files
committed
perldelta for the STATIC_ASSERT elements
1 parent 1e6ed71 commit e7a8320

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pod/perldelta.pod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,17 @@ now make use of the new function to streamline the process.
383383
C<Perl_newSVsv_flags> is now essentially a NULL pointer check and wrapper
384384
around the new function, so has been moved into F<sv_inline.h>.
385385

386+
=item *
387+
388+
L<perlapi/C<STATIC_ASSERT_DECL>> and C<STATIC_ASSERT_STMT> are like
389+
C<assert()>, but are evaluated at compile time. That means their
390+
argument must be a constant expression that can be verified by the
391+
compiler, and so they effectively have no cost, not appearing in the
392+
code that gets executed. These were added in v5.28, but not until now
393+
have we opened their use up to XS writers. At the same time, a new
394+
variant has been added, C<STATIC_ASSERT_EXPR> which is suitable for use
395+
in an expression, such as a comma expression in a C macro.
396+
386397
=back
387398

388399
=head1 Selected Bug Fixes

0 commit comments

Comments
 (0)