diff --git a/include/ztd/ranges/algorithm.hpp b/include/ztd/ranges/algorithm.hpp index 57f6fb3..fed735d 100644 --- a/include/ztd/ranges/algorithm.hpp +++ b/include/ztd/ranges/algorithm.hpp @@ -326,6 +326,15 @@ namespace ztd { namespace ranges { _OutRange(::std::move(__out_first), ::std::move(__out_last)) }; } + template + constexpr auto __copy(_Input&& __input, _Output&& __output) noexcept( + __copy_noexcept, ztd::ranges::range_const_sentinel_t<_Input>, + ztd::ranges::range_iterator_t<_Output>, ztd::ranges::range_sentinel_t<_Output>>()) { + return ::ztd::ranges::__rng_detail::__copy(::ztd::ranges::cbegin(std::forward<_Input>(__input)), + ::ztd::ranges::cend(__input), ::ztd::ranges::begin(std::forward<_Output>(__output)), + ::ztd::ranges::end(__output)); + } + template constexpr int __lexicographical_compare_three_way_basic( _First0 __first0, _Last0 __last0, _First1 __first1, _Last1 __last1) { diff --git a/include/ztd/version/detail/version.c.h b/include/ztd/version/detail/version.c.h index fd63728..278947b 100644 --- a/include/ztd/version/detail/version.c.h +++ b/include/ztd/version/detail/version.c.h @@ -88,6 +88,26 @@ #define ZTD_COMPILER_MINGW_I_ ZTD_OFF #endif +#if defined (ZTD_CXX_VERSION) + #define ZTD_CXX_VERSION_I_ ZTD_CXX_VERSION +#elif ZTD_IS_ON(ZTD_CXX) + #if ZTD_IS_ON(ZTD_COMPILER_VCXX) && defined(_MSVC_LANG) + #define ZTD_CXX_VERSION_I_ _MSVC_LANG + #else + #define ZTD_CXX_VERSION_I_ __cplusplus + #endif +#else + #define ZTD_CXX_VERSION_I_ 0 +#endif + +#if defined (ZTD_C_VERSION) + #define ZTD_C_VERSION_I_ ZTD_C_VERSION +#elif ZTD_IS_ON(ZTD_C) + #define ZTD_CXX_VERSION_I_ __STDC_VERSION__ +#else + #define ZTD_C_VERSION_I_ 0 +#endif + #if defined(__GLIBCXX__) #define ZTD_LIBSTDCXX_I_ ZTD_ON #else @@ -706,7 +726,7 @@ #if (ZTD_HAS_ATTRIBUTE_I_(no_unique_address) != 0L) #define ZTD_NO_UNIQUE_ADDRESS_I_ [[no_unique_address]] -#elif ZTD_IS_ON(ZTD_CXX) && ZTD_IS_ON(ZTD_COMPILER_VCXX) && _MSC_VER >= 1929L +#elif ZTD_IS_ON(ZTD_CXX) && ZTD_IS_ON(ZTD_COMPILER_VCXX) && _MSC_VER >= 1929L && ZTD_USE(ZTD_CXX_VERSION) >= 202000L #define ZTD_NO_UNIQUE_ADDRESS_I_ [[msvc::no_unique_address]] #else #define ZTD_NO_UNIQUE_ADDRESS_I_