Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ffc0c28
Mark templates users shouldn't specialize with _NO_SPECIALIZATIONS
localspook May 23, 2025
1d88ac3
Silence Clang's `-Wunknown-warning-option` warning
localspook May 24, 2025
a55da5a
Guard against evil macros
localspook May 24, 2025
3c05e87
Oops; accidentally removed one `_NO_SPECIALIZATIONS`
localspook May 24, 2025
bfbe3e5
Address feedback
localspook May 24, 2025
d0a2752
Disable tests properly
localspook May 25, 2025
2d45979
Also mark `unary_function` and `binary_function`
localspook Jun 5, 2025
6098e49
Move expected test failures into bogus section
localspook Jun 5, 2025
18bdd7b
Mark more templates in `<system_error>`...
localspook Jun 8, 2025
d52d77b
Realign with main
localspook Jun 24, 2025
2f62b17
Merge branch 'main' into gh5536
StephanTLavavej Sep 18, 2025
1b91ca9
Restore .clang-format; this change is no longer needed with Clang 20.
StephanTLavavej Sep 18, 2025
e3cd834
Drop silencing of `-Wunknown-warning-option` as Clang 20 recognizes `…
StephanTLavavej Sep 18, 2025
4455daf
Sort Clang warning suppressions.
StephanTLavavej Sep 18, 2025
7e6ddcc
Restore libcxx/expected_results.txt; the bogus test was fixed upstream.
StephanTLavavej Sep 18, 2025
a94d706
Add citations, part 1: Define the macros.
StephanTLavavej Sep 18, 2025
f039e81
Add citations, part 2: Update attributes.
StephanTLavavej Sep 18, 2025
6ddd383
Add citations, part 3: Update attribute for initializer_list and make…
StephanTLavavej Sep 18, 2025
8cd9ea8
Add citations, part 4: Mark declarations and definitions consistently.
StephanTLavavej Sep 18, 2025
8f6cf3c
Add citations, part 5: Mark basic_format_parse_context and basic_form…
StephanTLavavej Sep 18, 2025
69c2fd2
Add citations, part 6: Mark variable templates outside of `<type_trai…
StephanTLavavej Sep 18, 2025
3dfe3bf
Add citations, part 7: Mark `<type_traits>` (and `<xtr1common>`) as t…
StephanTLavavej Sep 18, 2025
568f620
Add defenses to __msvc_formatter.hpp.
StephanTLavavej Sep 18, 2025
969e218
Improve comment clarity.
StephanTLavavej Sep 18, 2025
25bd4e0
Update common_reference with dual citations.
StephanTLavavej Sep 18, 2025
a74775a
Comment when specializations are allowed for variable templates and t…
StephanTLavavej Sep 18, 2025
7ded1eb
Mark member class templates `mapping` and `rebind`.
StephanTLavavej Sep 19, 2025
1aa3323
Oops, guard `<mdspan>` and `<scoped_allocator>`.
StephanTLavavej Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ AllowShortFunctionsOnASingleLine: Empty
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AttributeMacros:
# - __capability
AttributeMacros:
- _NO_SPECIALIZATIONS
# BinPackArguments: true
# BinPackParameters: true
# BitFieldColonSpacing: Both
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/__msvc_chrono.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace chrono {
struct treat_as_floating_point : is_floating_point<_Rep> {}; // tests for floating-point type

_EXPORT_STD template <class _Rep>
constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value;
_NO_SPECIALIZATIONS constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value;

_EXPORT_STD template <class _Rep>
struct duration_values { // gets arithmetic properties of a type
Expand All @@ -53,7 +53,7 @@ namespace chrono {

#if _HAS_CXX20
_EXPORT_STD template <class _Clock>
constexpr bool is_clock_v = requires {
_NO_SPECIALIZATIONS constexpr bool is_clock_v = requires {
typename _Clock::rep;
typename _Clock::period;
typename _Clock::duration;
Expand All @@ -62,7 +62,7 @@ namespace chrono {
_Clock::now();
};
_EXPORT_STD template <class _Clock>
struct is_clock : bool_constant<is_clock_v<_Clock>> {};
struct _NO_SPECIALIZATIONS is_clock : bool_constant<is_clock_v<_Clock>> {};

template <class _Clock>
constexpr bool _Is_clock_v = is_clock_v<_Clock>;
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/__msvc_iter_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _EXPORT_STD template <class _Ty, class _Alloc>
struct uses_allocator : _Has_allocator_type<_Ty, _Alloc>::type {};

_EXPORT_STD template <class _Ty, class _Alloc>
constexpr bool uses_allocator_v = uses_allocator<_Ty, _Alloc>::value;
_NO_SPECIALIZATIONS constexpr bool uses_allocator_v = uses_allocator<_Ty, _Alloc>::value;

// from <iterator>
_EXPORT_STD struct input_iterator_tag {};
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/__msvc_ranges_tuple_formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ struct _Format_handler;
_FMT_P2286_END

_EXPORT_STD template <class _Context>
class basic_format_arg {
class _NO_SPECIALIZATIONS basic_format_arg {
public:
using _CharType = _Context::char_type;

Expand Down
2 changes: 1 addition & 1 deletion stl/inc/compare
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ using compare_three_way_result_t =
decltype(_STD declval<const remove_reference_t<_Ty1>&>() <=> _STD declval<const remove_reference_t<_Ty2>&>());

_EXPORT_STD template <class _Ty1, class _Ty2 = _Ty1>
struct compare_three_way_result {};
struct _NO_SPECIALIZATIONS compare_three_way_result {};

template <class _Ty1, class _Ty2>
requires requires { typename compare_three_way_result_t<_Ty1, _Ty2>; }
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/coroutine
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ _EXPORT_STD template <class _Ret, class...>
struct coroutine_traits : _Coroutine_traits<_Ret> {};

_EXPORT_STD template <class = void>
struct coroutine_handle;
struct _NO_SPECIALIZATIONS coroutine_handle;

template <>
struct coroutine_handle<void> {
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/functional
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@ template <class _Tx>
struct is_placeholder<const volatile _Tx> : is_placeholder<_Tx>::type {}; // ignore cv-qualifiers

_EXPORT_STD template <class _Ty>
constexpr int is_placeholder_v = is_placeholder<_Ty>::value;
_NO_SPECIALIZATIONS constexpr int is_placeholder_v = is_placeholder<_Ty>::value;

template <class _Ret, class _Fx, class... _Types>
class _Binder;
Expand All @@ -2025,7 +2025,7 @@ template <class _Tx>
struct is_bind_expression<const volatile _Tx> : is_bind_expression<_Tx>::type {}; // ignore cv-qualifiers

_EXPORT_STD template <class _Ty>
constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value;
_NO_SPECIALIZATIONS constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value;

template <class _Cv_TiD, bool = _Is_specialization_v<remove_cv_t<_Cv_TiD>, reference_wrapper>,
bool = is_bind_expression_v<_Cv_TiD>, int = is_placeholder_v<_Cv_TiD>>
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/generator
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ namespace _Gen_detail {
} // namespace _Gen_detail

_EXPORT_STD template <class _Rty, class _Vty, class _Alloc>
class generator : public _RANGES view_interface<generator<_Rty, _Vty, _Alloc>> {
class _NO_SPECIALIZATIONS generator : public _RANGES view_interface<generator<_Rty, _Vty, _Alloc>> {
private:
static_assert(_Gen_detail::_Valid_allocator<_Alloc>,
"generator allocators must use raw pointers (N4988 [coro.generator.class]/1.1)");
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/initializer_list
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _STL_DISABLE_CLANG_WARNINGS

_STD_BEGIN
_EXPORT_STD template <class _Elem>
class initializer_list {
class _NO_SPECIALIZATIONS initializer_list {
public:
using value_type = _Elem;
using reference = const _Elem&;
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ namespace ranges {
#if _HAS_CXX23
_EXPORT_STD template <class _Derived>
requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>>
class range_adaptor_closure : public _Pipe::_Base<_Derived> {};
class _NO_SPECIALIZATIONS range_adaptor_closure : public _Pipe::_Base<_Derived> {};
#endif // _HAS_CXX23

_EXPORT_STD template <class _Ty>
Expand Down
12 changes: 6 additions & 6 deletions stl/inc/ratio
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ struct ratio_equal : bool_constant<_Rx1::num == _Rx2::num && _Rx1::den == _Rx2::
};

_EXPORT_STD template <class _Rx1, class _Rx2>
constexpr bool ratio_equal_v = ratio_equal<_Rx1, _Rx2>::value;
_NO_SPECIALIZATIONS constexpr bool ratio_equal_v = ratio_equal<_Rx1, _Rx2>::value;

_EXPORT_STD template <class _Rx1, class _Rx2>
struct ratio_not_equal : bool_constant<!ratio_equal_v<_Rx1, _Rx2>> { // tests if ratio != ratio
static_assert(_Is_ratio_v<_Rx1> && _Is_ratio_v<_Rx2>, "ratio_not_equal<R1, R2> requires R1 and R2 to be ratio<>s.");
};

_EXPORT_STD template <class _Rx1, class _Rx2>
constexpr bool ratio_not_equal_v = ratio_not_equal<_Rx1, _Rx2>::value;
_NO_SPECIALIZATIONS constexpr bool ratio_not_equal_v = ratio_not_equal<_Rx1, _Rx2>::value;

struct _Big_uint128 {
uint64_t _Upper;
Expand Down Expand Up @@ -231,7 +231,7 @@ struct ratio_less : bool_constant<_Ratio_less(_Rx1::num, _Rx1::den, _Rx2::num, _
};

_EXPORT_STD template <class _Rx1, class _Rx2>
constexpr bool ratio_less_v = ratio_less<_Rx1, _Rx2>::value;
_NO_SPECIALIZATIONS constexpr bool ratio_less_v = ratio_less<_Rx1, _Rx2>::value;

_EXPORT_STD template <class _Rx1, class _Rx2>
struct ratio_less_equal : bool_constant<!ratio_less_v<_Rx2, _Rx1>> { // tests if ratio <= ratio
Expand All @@ -240,15 +240,15 @@ struct ratio_less_equal : bool_constant<!ratio_less_v<_Rx2, _Rx1>> { // tests if
};

_EXPORT_STD template <class _Rx1, class _Rx2>
constexpr bool ratio_less_equal_v = ratio_less_equal<_Rx1, _Rx2>::value;
_NO_SPECIALIZATIONS constexpr bool ratio_less_equal_v = ratio_less_equal<_Rx1, _Rx2>::value;

_EXPORT_STD template <class _Rx1, class _Rx2>
struct ratio_greater : ratio_less<_Rx2, _Rx1>::type { // tests if ratio > ratio
static_assert(_Is_ratio_v<_Rx1> && _Is_ratio_v<_Rx2>, "ratio_greater<R1, R2> requires R1 and R2 to be ratio<>s.");
};

_EXPORT_STD template <class _Rx1, class _Rx2>
constexpr bool ratio_greater_v = ratio_greater<_Rx1, _Rx2>::value;
_NO_SPECIALIZATIONS constexpr bool ratio_greater_v = ratio_greater<_Rx1, _Rx2>::value;

_EXPORT_STD template <class _Rx1, class _Rx2>
struct ratio_greater_equal : bool_constant<!ratio_less_v<_Rx1, _Rx2>> { // tests if ratio >= ratio
Expand All @@ -257,7 +257,7 @@ struct ratio_greater_equal : bool_constant<!ratio_less_v<_Rx1, _Rx2>> { // tests
};

_EXPORT_STD template <class _Rx1, class _Rx2>
constexpr bool ratio_greater_equal_v = ratio_greater_equal<_Rx1, _Rx2>::value;
_NO_SPECIALIZATIONS constexpr bool ratio_greater_equal_v = ratio_greater_equal<_Rx1, _Rx2>::value;

_EXPORT_STD using atto = ratio<1, 1000000000000000000LL>;
_EXPORT_STD using femto = ratio<1, 1000000000000000LL>;
Expand Down
Loading
Loading