mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
76b88a3cd5
Allows casting const-ness away from an expression, but doesn't allow changing the type. Enforcement of the latter currently only works for gcc-like compilers. Note that it is not safe to cast const-ness away if the result will ever be modified (it would be undefined behavior). Doing so can cause compiler mis-optimizations or runtime crashes (by modifying read-only memory). It is only safe to use when the result will not be modified, but API design or language restrictions prevent you from declaring that (e.g. because a function returns both const and non-const variables). Note that this only works in function scope, not for global variables (it would be nice, but not trivial, to improve that). UNCONSTIFY() requires static assert which is a feature in its own right. |
||
---|---|---|
.. | ||
Io | ||
BuildTest.pm | ||
CodeCountTest.pm | ||
ContainerTest.pm | ||
CoverageTest.pm | ||
DbVersion.pm | ||
DefineTest.pm | ||
ExecuteTest.pm | ||
FileTest.pm | ||
HostGroupTest.pm | ||
HostTest.pm | ||
JobTest.pm | ||
ListTest.pm | ||
LogTest.pm | ||
RunTest.pm | ||
Storage.pm | ||
StorageBase.pm | ||
StoragePosix.pm | ||
StoragePosixRead.pm | ||
StoragePosixWrite.pm | ||
StorageRepo.pm | ||
VmTest.pm | ||
Wait.pm |