Skip to content

Commit 2bb2cd9

Browse files
Kojoleyzygoloid
authored andcommitted
[basic.types] Replace macro constant with constexpr variable
1 parent eb03859 commit 2bb2cd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/basic.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4481,7 +4481,7 @@
44814481
subsequently hold its original value.
44824482
\begin{example}
44834483
\begin{codeblock}
4484-
#define N sizeof(T)
4484+
constexpr std::size_t N = sizeof(T);
44854485
char buf[N];
44864486
T obj; // \tcode{obj} initialized to its original value
44874487
std::memcpy(buf, &obj, N); // between these two calls to \tcode{std::memcpy}, \tcode{obj} might be modified

0 commit comments

Comments
 (0)