Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 12 additions & 2 deletions stl/inc/bitset
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ _STL_DISABLE_CLANG_WARNINGS
#pragma push_macro("new")
#undef new

// TRANSITION, non-_Ugly attribute tokens
#pragma push_macro("msvc")
#pragma push_macro("no_specializations")
#undef msvc
#undef no_specializations

#ifndef _STD_BITSET_TO_STREAM_STACK_RESERVATION
#define _STD_BITSET_TO_STREAM_STACK_RESERVATION 128
#endif // !defined(_STD_BITSET_TO_STREAM_STACK_RESERVATION)
Expand Down Expand Up @@ -72,8 +78,8 @@ struct _Buffer_for_bitset<_Elem, _Bits, false> {
_Elem _Buf[(_Bits != 0) ? _Bits : 1];
};

_EXPORT_STD template <size_t _Bits>
class bitset { // store fixed-length sequence of Boolean elements
_EXPORT_STD template <size_t _Bits> // store fixed-length sequence of Boolean elements
Comment thread
StephanTLavavej marked this conversation as resolved.
class _NO_SPECIALIZATIONS_CITING("N5014 [namespace.std]/2.1") bitset {
private:
#pragma warning(push)
#pragma warning(disable : 4296) // expression is always true (/Wall)
Expand Down Expand Up @@ -687,6 +693,10 @@ struct hash<bitset<_Bits>> {
};
_STD_END

// TRANSITION, non-_Ugly attribute tokens
#pragma pop_macro("no_specializations")
#pragma pop_macro("msvc")

#pragma pop_macro("new")
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/ratio
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ _NODISCARD constexpr intmax_t _Gcd(intmax_t _Ax, intmax_t _Bx) noexcept {
}

_EXPORT_STD template <intmax_t _Nx, intmax_t _Dx = 1>
struct ratio { // holds the ratio of _Nx to _Dx
struct _NO_SPECIALIZATIONS_CITING("N5014 [namespace.std]/2.1") ratio { // holds the ratio of _Nx to _Dx
static_assert(_Dx != 0, "zero denominator");
static_assert(-INTMAX_MAX <= _Nx, "numerator too negative");
static_assert(-INTMAX_MAX <= _Dx, "denominator too negative");
Expand Down