Skip to content

Commit 923bf3e

Browse files
committed
[se-0426] add note about stricter runtime checking in the future
1 parent 829aae9 commit 923bf3e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proposals/0426-bitwise-copyable.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ If, in a subsequent proposal, the protocol were redefined as a composition, symb
387387

388388
The standard library has a few pre-existing functions that receive a generic bitwise-copyable value as a parameter. These functions work with types for which the `_isPOD()` function returns true, even though they do not have a `BitwiseCopyable` conformance. If we were to deprecate these unconstrained versions, we would add unresolvable warnings to some of the codebases that use them. For example, they might use types that could be conditionally `BitwiseCopyable`, but come from a module whose types have not been conformed to `BitwiseCopyable` by their author. Furthermore, as explained [above](#transient-and-permanent), it is not necessarily the case that a transiently bitwise-copyable type can be permanently annotated as `BitwiseCopyable`.
389389

390+
At present, the unconstrained versions check that `_isPOD()` returns true in debug mode only. We may in the future consider changing them to check at all times, since in general their use in critical sections will have been updated to use the `BitwiseCopyable`-constrained overloads.
391+
390392
## Acknowledgments
391393

392394
This proposal has benefitted from discussions with John McCall, Joe Groff, Andrew Trick, Michael Gottesman, and Arnold Schwaigofer.

0 commit comments

Comments
 (0)