首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Toddler的笔记

    C++20 New Features

    Class non-type template parameters Before C++20 only integral types, enums, pointer and reference types could be used in non-type template parameters.

    83410发布于 2020-05-20
  • 来自专栏C/C++基础

    C++名字空间详解

    具体要求,参见C++标准关于模板非类型参数的要求: 14.3.2 Template non-type arguments [temp.arg.nontype] 1 A template-argument for a non-type, non-template template-parameter shall be one of: — an integral constant-expression of integral or enumeration type; or — the name of a non-type template-parameter; or — the address

    1.7K10发布于 2018-08-03
  • 来自专栏Toddler的笔记

    C++17 New Features

    doesn't have to be constexpr. 7.Non-type template parameters with auto type Automatically deduce type on non-type Remove Deprecated operator++(bool) Hexadecimal floating-point literals Allow constant evaluation for all non-type

    1.4K40发布于 2020-06-09
  • C++ Standards Support in GCC - GCC 对 C++ 标准的支持

    unlikely attributes P0479R5 9 Deprecate implicit capture of this via [=] P0806R2 9 Class Types in Non-Type definitions N4230 6 __cpp_nested_namespace_definitions >= 201411 Allow constant evaluation for all non-type templates P0091R3 P0512R0 7 8 __cpp_deduction_guides >= 201606 __cpp_deduction_guides >= 201611 Declaring non-type

    1.5K20发布于 2020-12-30
  • 来自专栏C++ 动态新闻推送

    C++ 中文周刊 2024-08-18 第166期

    isnan判定 DCHECK What's so hard about class types as non-type template parameters?

    29410编辑于 2024-08-19
  • 来自专栏小洁叫你mysql

    模板优化让程序更灵活更通用

    非类型模板参数 非类型模板参数(Non-type Template Parameters)是C++中的一种特殊的模板参数,它允许在使用模板时传递非类型的值作为参数。

    42310编辑于 2023-12-20
  • 来自专栏C++ 动态新闻推送

    C++ 动态新闻推送 第35期

    实现可能有问题 Moves in Returns 讨论了一些场景的返回值是否会被优化掉,copy elision的生效场景 Stringy Templates 讨论NTTP(Non-Type Template

    46720发布于 2021-11-01
  • 来自专栏tkokof 的技术,小趣及杂念

    [译]C++17, 语言核心层变化的更多细节

    非类型模板参数(non-type template parameters)的自动类型推导 首先要说明一下哪些属于非类型模板参数:他们是 nullptr, 整型, 左值引用, 指针 以及 枚举类型.下面的讲解主要以整型为主

    1.1K10编辑于 2022-01-12
  • 来自专栏CSDN搜“看,未来”

    redis.conf翻译与配置(五)【redis6.0.6】

    . # g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ... # $ String commands Keyspace 命令, 以__keystpace@<db>__ 前缀发布. # E Keyevent 命令, 以__keyevent@<db>__ 前缀发布. # g Generic 命令(non-type

    44120编辑于 2022-05-06
  • 来自专栏学习

    【C++模板】——C++模板的力量:构建灵活与安全的代码

    在C++中,模板参数可以分为两大类: 类型模板参数(type template parameters)和非类型模板参数(non-type template parameters)。

    56910编辑于 2024-11-21
  • 来自专栏Alan的blog

    类模板

    ``` - 关键字class(或在这种上下⽂中等价的关键字typename)指出T为**类型参数**, - int指出n的类型为int,这种参数(指定特殊的类型⽽不是⽤ 作泛型名)称为⾮类型(non-type

    3.8K20编辑于 2023-04-30
  • 来自专栏C++ 动态新闻推送

    C++ 动态新闻推送 第56期

    Be Really Awesome 介绍c++23强类型带来的优势 Did you know that C++20 added support for floating point values as non-type

    31420编辑于 2022-04-11
  • 【C++模板进阶】C++ 模板进阶的拦路虎:模板特化和分离编译,该如何逐个突破?

    非类型模板参数(Non-Type Template Parameters)是C++模板中允许使用的非类型值作为参数,即在编译时确定的常量表达式。

    20310编辑于 2025-12-23
  • C++为什么有参数依赖查找(ADL)?

    (s); // OK, qualified lookup finds the template 'f' N2::f<3>(s); // Error: N2::f does not take a non-type

    90010编辑于 2024-07-25
  • 来自专栏未竟东方白

    【翻译】C++17的新特性简介

    c1 {1}; // OK MyContainer<int> MyContainer c2; // OK MyContainer<float> 用auto来声明非类型的模板参数(Declaring non-type

    3.5K10发布于 2020-07-29
  • 来自专栏学习

    【C++】玩转模板:进阶之路

    和类类型参数的对比 特点 类型模板参数 (Type Template Parameter) 非类型模板参数 (Non-type Template Parameter) 参数形式 类型(如 int, double

    17800编辑于 2025-12-20
  • 来自专栏c语言与cpp编程

    C++模版的本质

    non-type template parameter: 非类型模板参数,比如整型,布尔,枚举,指针,引用等;此类主要是提供给大小,长度等整型标量参数的控制,其次还提供参数算术运算能力,这些能力结合模板特化为模板提供了初始化值

    2.1K30发布于 2021-03-25
  • 来自专栏CQ品势

    Effective C++: 改善程序与设计的55个具体做法

    ■ 因非类型模板参数(non-type template parameters)而造成的代码膨胀,往往可消除,做法是以函数参数或class成员变量替换template参数。

    1K20编辑于 2021-12-02
  • 来自专栏17的博客分享

    C++模板编程:深入理解分离编译的挑战与解决方案

    一、非类型模板参数 非类型模板参数(Non-type Template Parameters)是C++模板编程中的一个重要概念,它允许模板接受除了类型以外的其他类型的参数,比如整型、指针、引用和枚举等。

    79310编辑于 2024-10-16
  • 来自专栏IT综合技术分享

    Redis使用——Redis的redis.conf配置注释详解(四)

    . # g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ... # $ String commands

    64940编辑于 2022-01-11
领券