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
2 changes: 1 addition & 1 deletion stl/inc/generator
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _EMIT_STL_WARNING(STL4038, "The contents of <generator> are available only with

#include <coroutine>
#include <exception>
#include <ranges>
#include <xmemory>

#pragma pack(push, _CRT_PACKING)
#pragma warning(push, _STL_WARNING_LEVEL)
Expand Down
18 changes: 0 additions & 18 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,6 @@ namespace ranges {
template <class _Ty, size_t _Extent>
requires (_Extent != dynamic_extent)
constexpr auto _Compile_time_max_size<const span<_Ty, _Extent>> = _Extent;

#if defined(__cpp_lib_byte)
_EXPORT_STD template <range _Rng, class _Alloc = allocator<byte>>
#else // ^^^ defined(__cpp_lib_byte) / !defined(__cpp_lib_byte) vvv
_EXPORT_STD template <range _Rng, class _Alloc>
#endif // ^^^ !defined(__cpp_lib_byte) ^^^
struct elements_of {
/* [[no_unique_address]] */ _Rng range;
/* [[no_unique_address]] */ _Alloc allocator{};
};

#if defined(__cpp_lib_byte)
template <class _Rng, class _Alloc = allocator<byte>>
elements_of(_Rng&&, _Alloc = {}) -> elements_of<_Rng&&, _Alloc>;
#else // ^^^ defined(__cpp_lib_byte) / !defined(__cpp_lib_byte) vvv
template <class _Rng, class _Alloc>
elements_of(_Rng&&, _Alloc) -> elements_of<_Rng&&, _Alloc>;
#endif // ^^^ !defined(__cpp_lib_byte) ^^^
#endif // _HAS_CXX23

// clang-format off
Expand Down
22 changes: 22 additions & 0 deletions stl/inc/xmemory
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,28 @@ template <class _Ty>
concept _Transparent = _Is_transparent_v<_Ty>;
#endif // _HAS_CXX20

#if _HAS_CXX23
namespace ranges {
#if defined(__cpp_lib_byte)
_EXPORT_STD template <range _Rng, class _Alloc = allocator<byte>>
#else // ^^^ defined(__cpp_lib_byte) / !defined(__cpp_lib_byte) vvv
_EXPORT_STD template <range _Rng, class _Alloc>
#endif // ^^^ !defined(__cpp_lib_byte) ^^^
struct elements_of {
/* [[no_unique_address]] */ _Rng range;
/* [[no_unique_address]] */ _Alloc allocator{};
};

#if defined(__cpp_lib_byte)
template <class _Rng, class _Alloc = allocator<byte>>
elements_of(_Rng&&, _Alloc = {}) -> elements_of<_Rng&&, _Alloc>;
#else // ^^^ defined(__cpp_lib_byte) / !defined(__cpp_lib_byte) vvv
template <class _Rng, class _Alloc>
elements_of(_Rng&&, _Alloc) -> elements_of<_Rng&&, _Alloc>;
#endif // ^^^ !defined(__cpp_lib_byte) ^^^
} // namespace ranges
#endif // _HAS_CXX23

template <class _Elem, class _UTy>
_NODISCARD _Elem* _UIntegral_to_buff(_Elem* _RNext, _UTy _UVal) { // used by both to_string and thread::id output
// format _UVal into buffer *ending at* _RNext
Expand Down