Skip to content

CppMore

Dive deep into the C++ core, and discover more!

  • Home
  • Articles
  • TGS
  • RSS
  • Guestbook
  • About

C++26CategorySubscribe

C++26 反射元编程:Spec API 注入模型

引言 盛夏到了,赤日当空,蝉吟鹊噪,绿树浓阴如盖,万物争展其生机。 静态反射方冒出头,便给 C++ 注入了久违的活力。这是一个全新的语言。新在哪里呢?当然不是反射本身,而是伴随反射而来的代码生成能力。… Continue Reading C++26 反射元编程:Spec API 注入模型

  • Posted on: July 13, 2025 July 13, 2025
  • Author: Li Miu
  • Categories: C++26
  • Tags: Reflection
  • 3
  • Views 120

“……” 这种 C++ 语法已被标准弃用

去年,我在“What does the …… mean in C++?”一文中专门介绍过 …… 这种极其罕见的 C++ 语法,它其实是 …, … 的省略语法。以下这三种写法完全等价: … Continue Reading “……” 这种 C++ 语法已被标准弃用

  • Posted on: May 5, 2025 May 5, 2025
  • Author: Li Miu
  • Categories: C++26
  • 2
  • Views 347

C++26 Finally Makes std::projected ADL-Proof

std::projected 是 C++20 引入的一个模板工具,用于获取应用投影函数后迭代器所指向的值类型。例如: struct Person { std::string name; int age… Continue Reading C++26 Finally Makes std::projected ADL-Proof

  • Posted on: April 29, 2025 April 29, 2025
  • Author: Li Miu
  • Categories: C++26
  • Tags: C++26
  • 2
  • Views 262

C++26 function_ref and nontype_t

Motivation of std::function_ref std::function_ref 是轻量级的 std::function,能够引用任意形式的可调用对象。在此之前,C++ 便已存在许多… Continue Reading C++26 function_ref and nontype_t

  • Posted on: April 21, 2025 April 21, 2025
  • Author: Li Miu
  • Categories: C++26
  • 3
  • Views 338

C++26’s Placeholder variables with no name

元宵三五,夜雪初霁,蕙风透寒。 乘暇再更一个 C++26 的小特性,动机简单,看一下小例子: using Point3D = std::tuple<float, float, float>… Continue Reading C++26’s Placeholder variables with no name

  • Posted on: February 24, 2024 February 24, 2024
  • Author: Li Miu
  • Categories: C++26
  • Tags: C++26
  • 1
  • Views 630

C++26 Pack Indexing

目前进入 C++26 的特性当中,Pack Indexing 是较为有用的一个,值得谈谈。 发展背景 早期,C++ 元编程是摸着石头过河,许多特性只是当时情况下的权宜之计,并非最理想的解决方式。纵然非… Continue Reading C++26 Pack Indexing

  • Posted on: February 17, 2024 February 24, 2024
  • Author: Li Miu
  • Categories: C++26
  • Tags: C++26
  • 2
  • Views 1355

Reflection for C++26

岁月如驰,距前篇反射文章,已近两载。 C++23 工作殆尽,C++26 紧随其后,Relection 也有了一些新进展,本篇来看这些更新的些许内容。 相关作者 知识似树,发枝散叶,往往只需两三人而已。… Continue Reading Reflection for C++26

  • Posted on: February 8, 2024 April 28, 2024
  • Author: Li Miu
  • Categories: C++26
  • Tags: C++26, Expansion statements
  • 4
  • Views 3465

Notice

所有文章,俱为原创;未经允许,请勿转载。
网站新建,内容待迁,功能不全,尚在维护。

Free Books

C++ Generative Metaprogramming
The Book of Modern C++

Recent Posts

  • C++26 反射元编程:Spec API 注入模型
  • “……” 这种 C++ 语法已被标准弃用
  • std::monostate ≠ “空”类型
  • C++26 Finally Makes std::projected ADL-Proof
  • 另一种阻止 ADL 的巧妙手法
  • C++26 function_ref and nontype_t
  • C++ Adventures: Types
  • Clean Conversion from Run-time Values to Compile-time Constants in C++

Recent Comments

  1. 里缪 on T240725 Unnamed namespaces
  2. FrankHB on T240725 Unnamed namespaces
  3. 使用C++17简化代码 - tlanyan on Simplify Code with “if constexpr” in C++17
  4. 自动防御 on Compile time dispatching in C++20
  5. 里缪 on 《产生式元编程》第一章 宏编程计数引原理

Archives

  • July 2025 (1)
  • May 2025 (2)
  • April 2025 (3)
  • March 2025 (1)
  • October 2024 (1)
  • August 2024 (1)
  • July 2024 (3)
  • June 2024 (3)
  • May 2024 (3)
  • April 2024 (2)
  • March 2024 (2)
  • February 2024 (3)
  • January 2024 (3)
  • December 2023 (4)
  • November 2023 (5)
  • October 2023 (1)
  • September 2023 (5)
  • August 2023 (3)
  • July 2023 (5)
  • June 2023 (3)
  • May 2023 (1)
  • April 2023 (4)
  • March 2023 (1)
  • January 2023 (1)
  • November 2022 (1)
  • September 2022 (2)
  • July 2022 (2)
  • May 2022 (1)
  • February 2022 (2)
  • January 2022 (2)
  • August 2021 (1)
  • May 2021 (1)
  • July 2020 (1)
  • May 2020 (1)
  • April 2020 (2)
  • March 2020 (1)
  • January 2020 (1)
  • April 2019 (1)
  • March 2019 (5)
  • February 2019 (1)
  • January 2019 (3)
  • December 2018 (1)

Categories

  • Basics (8)
  • C++11 (1)
  • C++14 (1)
  • C++17 (2)
  • C++20 (7)
  • C++23 (2)
  • C++26 (7)
  • Concurrency (2)
  • Metaprogramming (16)
  • Networking (10)
  • Performance (2)
  • Techniques (4)
  • TodayGroupShared (23)
  • Tools (1)
  • Tricks (2)
  • 生活琐记 (2)

Attributes C++11 C++14 C++20 C++23 C++26 CMake Comma operator Constant expressions consteval constexpr constinit Coroutine deprecated Expansion statements explicit(bool) fallthrough Fold expressions Generative metaprogramming Idioms Initialization inline lambda Macros maybe_unused Monads namespace nodiscard noreturn no_unique_address NTTP Overload Resolution Pattern matching Polymorphism Recursive composition Recursive inheritance static std::exchange std::tuple tag-dispatching Tricks typename Value categories Variadic templates Vexing parses problem

Visitors

  • 288
  • 244
  • 3,500
  • 13,867
  • 87,598
  • 169,485
  • 53,962
  • 90

©2017 - 2025  CppMore.  All rights reserved.