stl: cannot specialize variables across namespaces

This commit is contained in:
skypjack
2026-04-28 16:17:26 +02:00
parent 7d527e2633
commit 4c47abaca7
3 changed files with 10 additions and 8 deletions

View File

@@ -8,10 +8,10 @@
# include "iterator.hpp"
template<class... Args>
inline constexpr bool entt::stl::ranges::enable_borrowed_range<entt::iterable_adaptor<Args...>>{true};
inline constexpr bool ENTT_STL_RANGES::enable_borrowed_range<entt::iterable_adaptor<Args...>>{true};
template<class... Args>
inline constexpr bool entt::stl::ranges::enable_view<entt::iterable_adaptor<Args...>>{true};
inline constexpr bool ENTT_STL_RANGES::enable_view<entt::iterable_adaptor<Args...>>{true};
#endif

View File

@@ -8,16 +8,16 @@
# include "fwd.hpp"
template<class... Args>
inline constexpr bool entt::stl::ranges::enable_borrowed_range<entt::basic_view<Args...>>{true};
inline constexpr bool ENTT_STL_RANGES::enable_borrowed_range<entt::basic_view<Args...>>{true};
template<class... Args>
inline constexpr bool entt::stl::ranges::enable_borrowed_range<entt::basic_group<Args...>>{true};
inline constexpr bool ENTT_STL_RANGES::enable_borrowed_range<entt::basic_group<Args...>>{true};
template<class... Args>
inline constexpr bool entt::stl::ranges::enable_view<entt::basic_view<Args...>>{true};
inline constexpr bool ENTT_STL_RANGES::enable_view<entt::basic_view<Args...>>{true};
template<class... Args>
inline constexpr bool entt::stl::ranges::enable_view<entt::basic_group<Args...>>{true};
inline constexpr bool ENTT_STL_RANGES::enable_view<entt::basic_group<Args...>>{true};
#endif

View File

@@ -9,10 +9,12 @@
/*! @cond ENTT_INTERNAL */
namespace entt::stl::ranges {
using std::ranges::enable_borrowed_range;
using std::ranges::enable_view;
// nothing to import (yet)
} // namespace entt::stl::ranges
# define ENTT_STL_RANGES std::ranges
/*! @endcond */
#endif