diff options
Diffstat (limited to 'libcxx/include/queue')
| -rw-r--r-- | libcxx/include/queue | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libcxx/include/queue b/libcxx/include/queue index 9a5cfb39f24e..6c1b892efadc 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -231,11 +231,9 @@ template <class T, class Container, class Compare> #include <vector> #include <version> -#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES -# include <functional> -#endif - // standard-mandated includes + +// [queue.syn] #include <compare> #include <initializer_list> @@ -384,6 +382,8 @@ public: swap(c, __q.c); } + _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI const _Container& __get_container() const { return c; } + template <class _T1, class _C1> friend _LIBCPP_INLINE_VISIBILITY @@ -635,6 +635,8 @@ public: void swap(priority_queue& __q) _NOEXCEPT_(__is_nothrow_swappable<container_type>::value && __is_nothrow_swappable<value_compare>::value); + + _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI const _Container& __get_container() const { return c; } }; #if _LIBCPP_STD_VER >= 17 @@ -960,4 +962,9 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Comp _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include <concepts> +# include <functional> +#endif + #endif // _LIBCPP_QUEUE |
