aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/stack
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/stack')
-rw-r--r--libcxx/include/stack13
1 files changed, 9 insertions, 4 deletions
diff --git a/libcxx/include/stack b/libcxx/include/stack
index 86435c4559de..d653d1bc7e49 100644
--- a/libcxx/include/stack
+++ b/libcxx/include/stack
@@ -107,11 +107,9 @@ template <class T, class Container>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-#endif
-
// standard-mandated includes
+
+// [stack.syn]
#include <compare>
#include <initializer_list>
@@ -257,6 +255,8 @@ public:
swap(c, __s.c);
}
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI const _Container& __get_container() const { return c; }
+
template <class T1, class _C1>
friend
bool
@@ -363,4 +363,9 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc>
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+#endif
+
#endif // _LIBCPP_STACK