摘要:
C++20 标准库在 <concepts> 头文件中提供了大量预定义 Concept,建议优先使用它们: Concept 含义 std::integral<T> 整数类型 std::floating_point<T> 浮点类型 std::same_as<T, U> T 和 U 是同一类型 std:: 阅读全文
posted @ 2026-08-14 17:57
长松入霄汉远望不盈尺
阅读(9)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <string> #include <concepts> // C++20 concepts header,必须要添加 /* * concept HasSize 定义了一个名为 HasSize 的约束。 * * requires(T t) { 阅读全文
posted @ 2026-08-14 17:48
长松入霄汉远望不盈尺
阅读(5)
评论(0)
推荐(0)

浙公网安备 33010602011771号