llvm/llvm-project

Docs for [[clang::no_specializations]] attribute use "explicitly specialized" ambiguously

開放

#143,719 建立於 2025年6月11日

 (4 則留言) (0 個反應) (1 位負責人)C++ (10,782 個分叉)batch import
clangdocumentationgood first issue

倉庫指標

星標
 (26,378 顆星)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

https://clang.llvm.org/docs/AttributeReference.html#no-specializations says (emphasis mine):

[[clang::no_specializations]] can be applied to function, class, or variable templates which should not be explicitly specialized by users. This is primarily used to diagnose user specializations of standard library type traits.

This seems like a poor choice of wording. The C++ standard talks about "partial specializations" and "explicit specializations", but what Clang refers to as "explicitly specialized" seems to be both. I think this is an internal term used within the clang codebase and does not match the terminology of the C++ standard.

IMHO it would make more sense for user-facing docs to use the standard terminology, or pick a completely different term which isn't ambiguous.

貢獻者指南