現在のブログ
ゲーム開発ブログ (2025年~) Gamedev Blog (2025~)
レガシーブログ
テクノロジーブログ (2018~2024年) リリースノート (2023~2025年) MeatBSD (2024年)
【C・C++】Overview of C23 and C++23
More than a year has already passed since C23 was released.
However, even now most compilers still default to C99 (except for GCC 15 and later), and since changes to the C standard are very small in scale compared to C++, C23 has largely passed by without attracting much attention.
On the other hand, every new C++ version tends to generate huge discussion, with C++11 and C++17 often called "the best versions" and C++20 frequently labeled "the worst version", attracting the most attention.
But when you look closely at the standard documents, you'll find that C23 actually includes many very attractive "C++-like" features, giving the strong impression that C23 has become quite a lightweight version of C++!
While C++23 has its own unique evolution, here I would like to focus mainly on the changes in C23 and consider what kind of impact they might have on future language choices.
C++ Still Reigns Supreme in Game Development
In game development, C++ maintains overwhelming dominance.
There are solid reasons for this.
Despite its notorious reputation as "the most bloated language in the world", in reality it is extremely fast and doesn't get in the way of development as much as Rust or Zig.
Also, the old image of being "unsafe" has gradually been improving since C++11.
If the evolution of C23 continues at this pace, it's possible that over the next 10 years or so, C could become much more widely used in the game industry as an alternative to C++.
It would be a very attractive position as "a C++ alternative that doesn't bloat".
C Still Reigns Supreme in Embedded Systems
In extremely resource-constrained embedded hardware, the true strength of C is most clearly demonstrated.
While the changes in C23 are convenient, adding too many features at once might actually hinder adoption, and embedded developers may prefer to stick with C99 or C11.
Main New Features of C23
The biggest update since C99.
Emphasis is placed on modernizing the language, improving safety, borrowing good ideas from C++, and enhancing practical usability.
It doesn't fundamentally change the basic philosophy of C, but many convenient tools have been added to improve expressiveness, type safety, and portability.
| Feature name | Description | Example |
|---|---|---|
| nullptr | Safe null pointer literal (replacement for NULL). Prevents implicit conversion to int |
int *p = nullptr; |
| true/false | true/false become keywords |
bool isInit = false; |
| auto | Type deduction for variable declarations (not allowed for function parameters/return types) | auto foo = 76; |
| typeof | Standardized type-of operator | typeof(76) y = 100; |
| Binary literals | 0b prefix for binary notation |
int bin = 0b1010; |
| Digit separators | For improved readability | int oku = 1'000'000'000; |
| _BitInt(N) | Integers with arbitrary exact bit width | _BitInt(128) big = 1; |
| Attributes | C++-style attribute syntax [[noreturn]], [[deprecated]], etc. |
[[noreturn]] void f(int i); |
| __has_include & __has_c_attribute | Check for existence of headers/attributes | #if __has_include(<stdio.h>) |
| constexpr | Usable for constant expressions | constexpr int max = 9000; |
| VLA with static size | Mandatory support | int arr[const N] |
| unreachable() | Tells compiler "this code is never reached" (for optimization) | if (false) unreachable(); |
| static_assert | Upgraded from macro to real keyword | static_assert(sizeof(int) == 4); |
Main Library Additions
- New headers:
<stdbit.h>(bit operations likepopcount),<stdckdint.h>(checked integer arithmetic with overflow detection) - UTF-8 support:
char8_ttype,mbrtoc8(),c8rtomb() - Decimal floating point:
_Decimal32/64/128(IEEE 754-2008 compliant) - Safer functions:
memset_explicit()(guaranteed zeroing), bounds-checking string functions (strncpy_setc.) - Time:
timespec_getres()(nanosecond resolution support) - Deprecated/removed: Deprecation of subnormal number macros, restrictions for safer old
reallocbehavior
Compiler Support Status
- GCC 15+, Clang 16+ → mostly complete support
- MSVC, Apple Clang → supported but many features missing (especially MSVC is quite weak)
Main New Features of C++23
Built on the modules and concepts of C++20, with focus on usability, performance, and safety improvements.
| Feature name | Description | Example |
|---|---|---|
| Explicit this member function | Explicit this parameter, cleaner CRTP |
auto add(auto &self, int x) -> auto & { return self + x; } |
| Multidimensional subscript | Allows a[i,j]-style comma-separated indexing |
struct Mat { auto operator[](std::sizet i, std::sizet j) {} }; |
| static operator[] | Callable on static member functions | struct S { static auto operator[](this S self) {} }; |
| Lambda simplifications | No empty () needed, attributes on call operator allowed |
auto lam = [](int x) { return x * 2; } |
| Implicit move fixes | More consistent prvalue/xvalue behavior in ranges & for-loops | Fewer bindings of temporaries |
| #elifdef / #elifndef | Preprocessor conditions borrowed from C23 | #ifdef(FOO) #elifdef(BAR) #endif |
| Non-literal constexpr | Variables, labels, goto allowed in constexpr (with runtime eval) | constexpr void foo() { int x = 1; if (x) goto label; label : } |
| Unicode improvements | Better wide string handling etc. | Improved std::wstring handling |
Main Library Additions
- Ranges enhancements (
find_last,contains, fold algorithms, move-only views,std::span::ssize()) std::expected(monadic error handling)std::mdspan(multidimensional array view)std::print/std::println(safe formatted output, synchronized output)- Enhanced
std::format std::flat_map/std::flat_set(cache-friendly vector-based containers)import std;(import entire standard library at once – faster compilation)- Others:
std::stacktrace,std::byteswap,atomic_ref, etc.
Compiler Support Status
- GCC 14+, Clang 17+, MSVC 2022+
C23 code example
#if __has_include(<stdio.h>)
#include <stdio.h>
#else
#error "<stdio.h>を見つけられません。"
#endif
int main(void) {
auto nrgb = nullptr;
auto rgb = 0b1010;
printf("rgb: %d\n", rgb); // 10
constexpr float r = 23.5f;
constexpr float g = 54.f;
constexpr float b = r * g;
printf("B: %.02f\n", b); // 1269.00
printf("true: %d\n", true); // 1
return 0;
}
$ cc -std=c23 c23.c -o c23
$ ./c23
rgb: 10
B: 1269.00
true: 1
$ ls -thal c23
-rwxr-xr-x 1 suwako suwako 10K 11月 12 16:21 c23
$ strip c23
$ objdump -M intel -d c23 | less
$ ls -thal c23
-rwxr-xr-x 1 suwako suwako 4.7K 11月 12 16:37 c23
$ objdump -M intel -d c23 | less
2016d0: 55 push rbp
2016d1: 48 89 e5 mov rbp, rsp
2016d4: 48 83 ec 20 sub rsp, 0x20
2016d8: c7 45 fc 00 00 00 00 mov dword ptr [rbp - 0x4], 0x0
2016df: 48 c7 45 f0 00 00 00 00 mov qword ptr [rbp - 0x10], 0x0
2016e7: c7 45 ec 0a 00 00 00 mov dword ptr [rbp - 0x14], 0xa
2016ee: 8b 75 ec mov esi, dword ptr [rbp - 0x14]
2016f1: 48 bf d9 04 20 00 00 00 00 00 movabs rdi, 0x2004d9
2016fb: b0 00 mov al, 0x0
2016fd: e8 fe 00 00 00 call 0x201800 <printf@plt>
201702: f3 0f 10 05 f6 ed ff ff movss xmm0, dword ptr [rip - 0x120a] # 0x200500
20170a: f3 0f 11 45 e8 movss dword ptr [rbp - 0x18], xmm0
20170f: f3 0f 10 05 ed ed ff ff movss xmm0, dword ptr [rip - 0x1213] # 0x200504
201717: f3 0f 11 45 e4 movss dword ptr [rbp - 0x1c], xmm0
20171c: f3 0f 10 05 e4 ed ff ff movss xmm0, dword ptr [rip - 0x121c] # 0x200508
201724: f3 0f 11 45 e0 movss dword ptr [rbp - 0x20], xmm0
201729: 48 bf ec 04 20 00 00 00 00 00 movabs rdi, 0x2004ec
201733: f2 0f 10 05 bd ed ff ff movsd xmm0, qword ptr [rip - 0x1243] # 0x2004f8
20173b: b0 01 mov al, 0x1
20173d: e8 be 00 00 00 call 0x201800 <printf@plt>
201742: 48 bf e2 04 20 00 00 00 00 00 movabs rdi, 0x2004e2
20174c: be 01 00 00 00 mov esi, 0x1
201751: b0 00 mov al, 0x0
201753: e8 a8 00 00 00 call 0x201800 <printf@plt>
201758: 31 c0 xor eax, eax
20175a: 48 83 c4 20 add rsp, 0x20
20175e: 5d pop rbp
20175f: c3 ret
C++23 code example
#include <print>
#include <unordered_map>
#include <string>
#include <numeric>
int main(void) {
std::unordered_map<std::string, double> country_sizes = {
{"アメリカ", 9833517},
{"カナダ", 9984670},
{"オーストラリア", 7692024},
{"中国", 9596961},
{"ポーランド", 312696},
};
constexpr double KM_TO_MI = 0.386102;
const double total_km = std::accumulate(country_sizes.begin(), country_sizes.end(), 0.0, [](double sum, const auto &entry) { return sum + entry.second; });
const double total_mi = total_km * KM_TO_MI;
std::println("{:<15} | {:>15} | {:>15}", "国", "サイズ (km²)", "サイズ (mi²)");
std::println("{:-<15}-+-{:-<15}-+-{:-<15}", "", "", "");
for (const auto &[country, size_km] : country_sizes) {
double size_mi = size_km * KM_TO_MI;
std::println("{:<15} | {:>15.0f} | {:>15.2f}", country, size_km, size_mi);
}
std::println("{:-<15}-+-{:-<15}-+-{:-<15}", "", "", "");
std::println("{:<15} | {:>15.0f} | {:>15.2f}", "合格", total_km, total_mi);
return 0;
}
$ c++ -std=c++23 cpp23.cc -o cpp23
$ ./cpp23
国 | サイズ (km²) | サイズ (mi²)
----------------+-----------------+----------------
ポーランド | 312696 | 120732.55
中国 | 9596961 | 3705405.84
オーストラリア | 7692024 | 2969905.85
カナダ | 9984670 | 3855101.06
アメリカ | 9833517 | 3796740.58
----------------+-----------------+----------------
合格 | 37419868 | 14447885.87
$ ls -thal cpp23
-rwxr-xr-x 1 suwako suwako 377K 11月 12 16:32 cpp23
$ strip cpp23
$ ls -thal cpp23
-rwxr-xr-x 1 suwako suwako 185K 11月 12 16:39 cpp23
$ objdump -M intel -d cpp23 | less
211790: 55 push rbp
211791: 48 89 e5 mov rbp, rsp
211794: 48 81 ec 30 02 00 00 sub rsp, 0x230
21179b: c7 45 fc 00 00 00 00 mov dword ptr [rbp - 0x4], 0x0
2117a2: 48 8d bd 20 ff ff ff lea rdi, [rbp - 0xe0]
2117a9: 48 89 bd 18 ff ff ff mov qword ptr [rbp - 0xe8], rdi
2117b0: c7 85 14 ff ff ff 2d 0c 96 00 mov dword ptr [rbp - 0xec], 0x960c2d
2117ba: be bf 1a 20 00 mov esi, 0x201abf
2117bf: 48 8d 95 14 ff ff ff lea rdx, [rbp - 0xec]
2117c6: e8 55 05 00 00 call 0x211d20 <.text+0x640>
2117cb: eb 00 jmp 0x2117cd <.text+0xed>
2117cd: 48 8d bd 40 ff ff ff lea rdi, [rbp - 0xc0]
2117d4: 48 89 bd 18 ff ff ff mov qword ptr [rbp - 0xe8], rdi
2117db: c7 85 00 ff ff ff 9e 5a 98 00 mov dword ptr [rbp - 0x100], 0x985a9e
2117e5: be 39 1d 20 00 mov esi, 0x201d39
2117ea: 48 8d 95 00 ff ff ff lea rdx, [rbp - 0x100]
2117f1: e8 7a 05 00 00 call 0x211d70 <.text+0x690>
2117f6: eb 00 jmp 0x2117f8 <.text+0x118>
2117f8: 48 8d bd 60 ff ff ff lea rdi, [rbp - 0xa0]
2117ff: 48 89 bd 18 ff ff ff mov qword ptr [rbp - 0xe8], rdi
211806: c7 85 fc fe ff ff f8 5e 75 00 mov dword ptr [rbp - 0x104], 0x755ef8
211810: be 87 1d 20 00 mov esi, 0x201d87
211815: 48 8d 95 fc fe ff ff lea rdx, [rbp - 0x104]
21181c: e8 9f 05 00 00 call 0x211dc0 <.text+0x6e0>
211821: eb 00 jmp 0x211823 <.text+0x143>
211823: 48 8d 7d 80 lea rdi, [rbp - 0x80]
211827: 48 89 bd 18 ff ff ff mov qword ptr [rbp - 0xe8], rdi
21182e: c7 85 f8 fe ff ff 21 70 92 00 mov dword ptr [rbp - 0x108], 0x927021
211838: be e3 19 20 00 mov esi, 0x2019e3
21183d: 48 8d 95 f8 fe ff ff lea rdx, [rbp - 0x108]
211844: e8 c7 05 00 00 call 0x211e10 <.text+0x730>
211849: eb 00 jmp 0x21184b <.text+0x16b>
21184b: 48 8d 7d a0 lea rdi, [rbp - 0x60]
21184f: 48 89 bd 18 ff ff ff mov qword ptr [rbp - 0xe8], rdi
211856: c7 85 f4 fe ff ff 78 c5 04 00 mov dword ptr [rbp - 0x10c], 0x4c578
211860: be ff 1c 20 00 mov esi, 0x201cff
211865: 48 8d 95 f4 fe ff ff lea rdx, [rbp - 0x10c]
21186c: e8 ef 05 00 00 call 0x211e60 <.text+0x780>
211871: eb 00 jmp 0x211873 <.text+0x193>
211873: 48 8d 85 20 ff ff ff lea rax, [rbp - 0xe0]
21187a: 48 89 45 c0 mov qword ptr [rbp - 0x40], rax
21187e: 48 c7 45 c8 05 00 00 00 mov qword ptr [rbp - 0x38], 0x5
211886: 48 8b 75 c0 mov rsi, qword ptr [rbp - 0x40]
21188a: 48 8b 55 c8 mov rdx, qword ptr [rbp - 0x38]
21188e: 48 8d 7d d0 lea rdi, [rbp - 0x30]
211892: e8 39 06 00 00 call 0x211ed0 <.text+0x7f0>
211897: eb 00 jmp 0x211899 <.text+0x1b9>
211899: 48 8d 85 20 ff ff ff lea rax, [rbp - 0xe0]
2118a0: 48 89 85 28 fe ff ff mov qword ptr [rbp - 0x1d8], rax
2118a7: 48 05 a0 00 00 00 add rax, 0xa0
2118ad: 48 89 85 30 fe ff ff mov qword ptr [rbp - 0x1d0], rax
2118b4: 48 8b bd 30 fe ff ff mov rdi, qword ptr [rbp - 0x1d0]
2118bb: 48 83 c7 e0 add rdi, -0x20
2118bf: 48 89 bd 20 fe ff ff mov qword ptr [rbp - 0x1e0], rdi
2118c6: e8 e5 05 00 00 call 0x211eb0 <.text+0x7d0>
2118cb: 48 8b 8d 28 fe ff ff mov rcx, qword ptr [rbp - 0x1d8]
2118d2: 48 8b 85 20 fe ff ff mov rax, qword ptr [rbp - 0x1e0]
2118d9: 48 39 c8 cmp rax, rcx
2118dc: 48 89 85 30 fe ff ff mov qword ptr [rbp - 0x1d0], rax
2118e3: 75 cf jne 0x2118b4 <.text+0x1d4>
2118e5: 48 b8 6d e4 ba 29 e5 b5 d8 3f movabs rax, 0x3fd8b5e529bae46d
2118ef: 48 89 85 e8 fe ff ff mov qword ptr [rbp - 0x118], rax
2118f6: 48 8d 7d d0 lea rdi, [rbp - 0x30]
2118fa: 48 89 bd 10 fe ff ff mov qword ptr [rbp - 0x1f0], rdi
211901: e8 4a 06 00 00 call 0x211f50 <.text+0x870>
211906: 48 8b bd 10 fe ff ff mov rdi, qword ptr [rbp - 0x1f0]
21190d: 48 89 85 d8 fe ff ff mov qword ptr [rbp - 0x128], rax
211914: e8 67 06 00 00 call 0x211f80 <.text+0x8a0>
211919: 48 89 85 d0 fe ff ff mov qword ptr [rbp - 0x130], rax
211920: 48 8b bd d8 fe ff ff mov rdi, qword ptr [rbp - 0x128]
211927: 48 8b b5 d0 fe ff ff mov rsi, qword ptr [rbp - 0x130]
21192e: 0f 57 c0 xorps xmm0, xmm0
211931: e8 4a 03 00 00 call 0x211c80 <.text+0x5a0>
211936: f2 0f 11 85 18 fe ff ff movsd qword ptr [rbp - 0x1e8], xmm0
21193e: eb 00 jmp 0x211940 <.text+0x260>
211940: f2 0f 10 85 18 fe ff ff movsd xmm0, qword ptr [rbp - 0x1e8]
211948: f2 0f 11 85 e0 fe ff ff movsd qword ptr [rbp - 0x120], xmm0
211950: f2 0f 10 85 e0 fe ff ff movsd xmm0, qword ptr [rbp - 0x120]
211958: f2 0f 10 0d 00 07 ff ff movsd xmm1, qword ptr [rip - 0xf900] # 0x202060
211960: f2 0f 59 c1 mulsd xmm0, xmm1
211964: f2 0f 11 85 c0 fe ff ff movsd qword ptr [rbp - 0x140], xmm0
21196c: 48 c7 85 b8 fe ff ff 18 00 00 00 mov qword ptr [rbp - 0x148], 0x18
211977: 48 c7 85 b0 fe ff ff 41 1a 20 00 mov qword ptr [rbp - 0x150], 0x201a41
211982: 48 8b bd b0 fe ff ff mov rdi, qword ptr [rbp - 0x150]
211989: 48 8b b5 b8 fe ff ff mov rsi, qword ptr [rbp - 0x148]
211990: ba b5 19 20 00 mov edx, 0x2019b5
211995: b9 58 1d 20 00 mov ecx, 0x201d58
21199a: 41 b8 69 1d 20 00 mov r8d, 0x201d69
2119a0: e8 0b 06 00 00 call 0x211fb0 <.text+0x8d0>
2119a5: eb 00 jmp 0x2119a7 <.text+0x2c7>
2119a7: 48 c7 85 a8 fe ff ff 1b 00 00 00 mov qword ptr [rbp - 0x158], 0x1b
2119b2: 48 c7 85 a0 fe ff ff b9 19 20 00 mov qword ptr [rbp - 0x160], 0x2019b9
2119bd: 48 8b bd a0 fe ff ff mov rdi, qword ptr [rbp - 0x160]
2119c4: 48 8b b5 a8 fe ff ff mov rsi, qword ptr [rbp - 0x158]
2119cb: 41 b8 8c 1a 20 00 mov r8d, 0x201a8c
2119d1: 4c 89 c2 mov rdx, r8
2119d4: 4c 89 c1 mov rcx, r8
2119d7: e8 34 06 00 00 call 0x212010 <.text+0x930>
2119dc: eb 00 jmp 0x2119de <.text+0x2fe>
2119de: 48 8d 45 d0 lea rax, [rbp - 0x30]
2119e2: 48 89 85 98 fe ff ff mov qword ptr [rbp - 0x168], rax
2119e9: 48 8b bd 98 fe ff ff mov rdi, qword ptr [rbp - 0x168]
2119f0: e8 5b 05 00 00 call 0x211f50 <.text+0x870>
2119f5: 48 89 85 90 fe ff ff mov qword ptr [rbp - 0x170], rax
2119fc: 48 8b bd 98 fe ff ff mov rdi, qword ptr [rbp - 0x168]
211a03: e8 78 05 00 00 call 0x211f80 <.text+0x8a0>
211a08: 48 89 85 88 fe ff ff mov qword ptr [rbp - 0x178], rax
211a0f: 48 8d bd 90 fe ff ff lea rdi, [rbp - 0x170]
211a16: 48 8d b5 88 fe ff ff lea rsi, [rbp - 0x178]
211a1d: e8 4e 06 00 00 call 0x212070 <.text+0x990>
211a22: 88 85 0f fe ff ff mov byte ptr [rbp - 0x1f1], al
211a28: eb 00 jmp 0x211a2a <.text+0x34a>
211a2a: 8a 85 0f fe ff ff mov al, byte ptr [rbp - 0x1f1]
211a30: 34 ff xor al, -0x1
211a32: a8 01 test al, 0x1
211a34: 75 05 jne 0x211a3b <.text+0x35b>
211a36: e9 a2 01 00 00 jmp 0x211bdd <.text+0x4fd>
211a3b: 48 8d bd 90 fe ff ff lea rdi, [rbp - 0x170]
211a42: e8 59 06 00 00 call 0x2120a0 <.text+0x9c0>
211a47: 48 89 85 00 fe ff ff mov qword ptr [rbp - 0x200], rax
211a4e: eb 00 jmp 0x211a50 <.text+0x370>
211a50: 48 8b 85 00 fe ff ff mov rax, qword ptr [rbp - 0x200]
211a57: 48 89 85 80 fe ff ff mov qword ptr [rbp - 0x180], rax
211a5e: 48 8b bd 80 fe ff ff mov rdi, qword ptr [rbp - 0x180]
211a65: e8 66 06 00 00 call 0x2120d0 <.text+0x9f0>
211a6a: 48 89 85 78 fe ff ff mov qword ptr [rbp - 0x188], rax
211a71: 48 8b bd 80 fe ff ff mov rdi, qword ptr [rbp - 0x180]
211a78: e8 73 06 00 00 call 0x2120f0 <.text+0xa10>
211a7d: 48 89 85 70 fe ff ff mov qword ptr [rbp - 0x190], rax
211a84: 48 8b 85 70 fe ff ff mov rax, qword ptr [rbp - 0x190]
211a8b: f2 0f 10 00 movsd xmm0, qword ptr [rax]
211a8f: f2 0f 10 0d c9 05 ff ff movsd xmm1, qword ptr [rip - 0xfa37] # 0x202060
211a97: f2 0f 59 c1 mulsd xmm0, xmm1
211a9b: f2 0f 11 85 68 fe ff ff movsd qword ptr [rbp - 0x198], xmm0
211aa3: 48 c7 85 60 fe ff ff 1e 00 00 00 mov qword ptr [rbp - 0x1a0], 0x1e
211aae: 48 c7 85 58 fe ff ff 4c 1b 20 00 mov qword ptr [rbp - 0x1a8], 0x201b4c
211ab9: 48 8b 95 78 fe ff ff mov rdx, qword ptr [rbp - 0x188]
211ac0: 48 8b 8d 70 fe ff ff mov rcx, qword ptr [rbp - 0x190]
211ac7: 48 8b bd 58 fe ff ff mov rdi, qword ptr [rbp - 0x1a8]
211ace: 48 8b b5 60 fe ff ff mov rsi, qword ptr [rbp - 0x1a0]
211ad5: 4c 8d 85 68 fe ff ff lea r8, [rbp - 0x198]
211adc: e8 2f 06 00 00 call 0x212110 <.text+0xa30>
211ae1: eb 00 jmp 0x211ae3 <.text+0x403>
211ae3: eb 00 jmp 0x211ae5 <.text+0x405>
211ae5: 48 8d bd 90 fe ff ff lea rdi, [rbp - 0x170]
211aec: e8 7f 06 00 00 call 0x212170 <.text+0xa90>
211af1: eb 00 jmp 0x211af3 <.text+0x413>
211af3: e9 17 ff ff ff jmp 0x211a0f <.text+0x32f>
211af8: 48 89 c1 mov rcx, rax
211afb: 89 d0 mov eax, edx
211afd: 48 89 8d 08 ff ff ff mov qword ptr [rbp - 0xf8], rcx
211b04: 89 85 04 ff ff ff mov dword ptr [rbp - 0xfc], eax
211b0a: 48 8b 85 18 ff ff ff mov rax, qword ptr [rbp - 0xe8]
211b11: 48 8d 8d 20 ff ff ff lea rcx, [rbp - 0xe0]
211b18: 48 39 c1 cmp rcx, rax
211b1b: 48 89 85 f8 fd ff ff mov qword ptr [rbp - 0x208], rax
211b22: 74 31 je 0x211b55 <.text+0x475>
211b24: 48 8b bd f8 fd ff ff mov rdi, qword ptr [rbp - 0x208]
211b2b: 48 83 c7 e0 add rdi, -0x20
211b2f: 48 89 bd f0 fd ff ff mov qword ptr [rbp - 0x210], rdi
211b36: e8 75 03 00 00 call 0x211eb0 <.text+0x7d0>
211b3b: 48 8b 85 f0 fd ff ff mov rax, qword ptr [rbp - 0x210]
211b42: 48 8d 8d 20 ff ff ff lea rcx, [rbp - 0xe0]
211b49: 48 39 c8 cmp rax, rcx
211b4c: 48 89 85 f8 fd ff ff mov qword ptr [rbp - 0x208], rax
211b53: 75 cf jne 0x211b24 <.text+0x444>
211b55: e9 14 01 00 00 jmp 0x211c6e <.text+0x58e>
211b5a: 48 89 c1 mov rcx, rax
211b5d: 89 d0 mov eax, edx
211b5f: 48 89 8d 08 ff ff ff mov qword ptr [rbp - 0xf8], rcx
211b66: 89 85 04 ff ff ff mov dword ptr [rbp - 0xfc], eax
211b6c: 48 8d 85 20 ff ff ff lea rax, [rbp - 0xe0]
211b73: 48 89 85 e0 fd ff ff mov qword ptr [rbp - 0x220], rax
211b7a: 48 05 a0 00 00 00 add rax, 0xa0
211b80: 48 89 85 e8 fd ff ff mov qword ptr [rbp - 0x218], rax
211b87: 48 8b bd e8 fd ff ff mov rdi, qword ptr [rbp - 0x218]
211b8e: 48 83 c7 e0 add rdi, -0x20
211b92: 48 89 bd d8 fd ff ff mov qword ptr [rbp - 0x228], rdi
211b99: e8 12 03 00 00 call 0x211eb0 <.text+0x7d0>
211b9e: 48 8b 8d e0 fd ff ff mov rcx, qword ptr [rbp - 0x220]
211ba5: 48 8b 85 d8 fd ff ff mov rax, qword ptr [rbp - 0x228]
211bac: 48 39 c8 cmp rax, rcx
211baf: 48 89 85 e8 fd ff ff mov qword ptr [rbp - 0x218], rax
211bb6: 75 cf jne 0x211b87 <.text+0x4a7>
211bb8: e9 b1 00 00 00 jmp 0x211c6e <.text+0x58e>
211bbd: 48 89 c1 mov rcx, rax
211bc0: 89 d0 mov eax, edx
211bc2: 48 89 8d 08 ff ff ff mov qword ptr [rbp - 0xf8], rcx
211bc9: 89 85 04 ff ff ff mov dword ptr [rbp - 0xfc], eax
211bcf: 48 8d 7d d0 lea rdi, [rbp - 0x30]
211bd3: e8 28 06 00 00 call 0x212200 <.text+0xb20>
211bd8: e9 91 00 00 00 jmp 0x211c6e <.text+0x58e>
211bdd: 48 c7 85 50 fe ff ff 1b 00 00 00 mov qword ptr [rbp - 0x1b0], 0x1b
211be8: 48 c7 85 48 fe ff ff b9 19 20 00 mov qword ptr [rbp - 0x1b8], 0x2019b9
211bf3: 48 8b bd 48 fe ff ff mov rdi, qword ptr [rbp - 0x1b8]
211bfa: 48 8b b5 50 fe ff ff mov rsi, qword ptr [rbp - 0x1b0]
211c01: 41 b8 8c 1a 20 00 mov r8d, 0x201a8c
211c07: 4c 89 c2 mov rdx, r8
211c0a: 4c 89 c1 mov rcx, r8
211c0d: e8 fe 03 00 00 call 0x212010 <.text+0x930>
211c12: eb 00 jmp 0x211c14 <.text+0x534>
211c14: 48 c7 85 40 fe ff ff 1e 00 00 00 mov qword ptr [rbp - 0x1c0], 0x1e
211c1f: 48 c7 85 38 fe ff ff 4c 1b 20 00 mov qword ptr [rbp - 0x1c8], 0x201b4c
211c2a: 48 8b bd 38 fe ff ff mov rdi, qword ptr [rbp - 0x1c8]
211c31: 48 8b b5 40 fe ff ff mov rsi, qword ptr [rbp - 0x1c0]
211c38: ba cc 1a 20 00 mov edx, 0x201acc
211c3d: 48 8d 8d e0 fe ff ff lea rcx, [rbp - 0x120]
211c44: 4c 8d 85 c0 fe ff ff lea r8, [rbp - 0x140]
211c4b: e8 50 05 00 00 call 0x2121a0 <.text+0xac0>
211c50: eb 00 jmp 0x211c52 <.text+0x572>
211c52: c7 45 fc 00 00 00 00 mov dword ptr [rbp - 0x4], 0x0
211c59: 48 8d 7d d0 lea rdi, [rbp - 0x30]
211c5d: e8 9e 05 00 00 call 0x212200 <.text+0xb20>
211c62: 8b 45 fc mov eax, dword ptr [rbp - 0x4]
211c65: 48 81 c4 30 02 00 00 add rsp, 0x230
211c6c: 5d pop rbp
211c6d: c3 ret
211c6e: 48 8b bd 08 ff ff ff mov rdi, qword ptr [rbp - 0xf8]
211c75: e8 d6 c5 01 00 call 0x22e250 <_Unwind_Resume@plt>
211c7a: 66 0f 1f 44 00 00 nop word ptr [rax + rax]
211c80: 55 push rbp
211c81: 48 89 e5 mov rbp, rsp
211c84: 48 83 ec 30 sub rsp, 0x30
211c88: 48 89 7d f8 mov qword ptr [rbp - 0x8], rdi
211c8c: 48 89 75 f0 mov qword ptr [rbp - 0x10], rsi
211c90: f2 0f 11 45 e0 movsd qword ptr [rbp - 0x20], xmm0
211c95: 48 8d 7d f8 lea rdi, [rbp - 0x8]
211c99: 48 8d 75 f0 lea rsi, [rbp - 0x10]
211c9d: e8 ce 03 00 00 call 0x212070 <.text+0x990>
211ca2: 34 ff xor al, -0x1
211ca4: a8 01 test al, 0x1
211ca6: 75 02 jne 0x211caa <.text+0x5ca>
211ca8: eb 34 jmp 0x211cde <.text+0x5fe>
211caa: f2 0f 10 45 e0 movsd xmm0, qword ptr [rbp - 0x20]
211caf: f2 0f 11 45 d8 movsd qword ptr [rbp - 0x28], xmm0
211cb4: 48 8d 7d f8 lea rdi, [rbp - 0x8]
211cb8: e8 e3 03 00 00 call 0x2120a0 <.text+0x9c0>
211cbd: f2 0f 10 45 d8 movsd xmm0, qword ptr [rbp - 0x28]
211cc2: 48 89 c6 mov rsi, rax
211cc5: 48 8d 7d ef lea rdi, [rbp - 0x11]
211cc9: e8 22 00 00 00 call 0x211cf0 <.text+0x610>
211cce: f2 0f 11 45 e0 movsd qword ptr [rbp - 0x20], xmm0
211cd3: 48 8d 7d f8 lea rdi, [rbp - 0x8]
211cd7: e8 94 04 00 00 call 0x212170 <.text+0xa90>
211cdc: eb b7 jmp 0x211c95 <.text+0x5b5>
211cde: f2 0f 10 45 e0 movsd xmm0, qword ptr [rbp - 0x20]
211ce3: 48 83 c4 30 add rsp, 0x30
211ce7: 5d pop rbp
211ce8: c3 ret
The Future of C and C++
Both C23 and C++23 were officially published on October 31, 2024 (both were delayed).
Work on the next standards (C2Y for C, C++2c or C++26 for C++) began almost immediately afterward.
While C++ has maintained a roughly 3-year cycle since 2011 (C++11→14→17→20→23), C has followed a 6-year cycle since 2011 (C11→C17→C23), and since C17 was mostly bug fixes, it appears to be progressing at a very relaxed pace.
Looking Ahead
This blog was not originally intended to be a deep dive into programming languages,but over the past year it has repeatedly covered C, C++, assembly, and Vulkan so much that it has somehow turned into something like a "C・C++・Assembly・Vulkan specialized site" — which I happily accept.
Going forward, I plan to cover GLSL as well (especially Vulkan-oriented GLSL).
Since GLSL has slightly different specifications depending on whether it's for OpenGL, GLES, WebGL, or Vulkan, it can be a bit tricky,but I intend to focus mainly on Vulkan-style GLSL, which aligns with the direction the game industry is heading.
While it's possible to cover all of systems programming,I have almost no practical experience with Zig and literally zero with Rust in real projects, so I don't think it's appropriate to deeply cover languages I don't know well.
On the other hand, while I have used Go and PHP quite extensively in the past (this blog itself is written in PHP, and I've released several Go-based products), they are more web-development-oriented languages, and having worked in web development for 18 years, I'm completely burned out on that field and have no plans to cover them.
Of course, when C++26 (and most likely C26, though not yet confirmed) are released, I plan to cover those as well.
That's all