3.1 KiB
[stack.cons.alloc]
23 Containers library [containers]
23.6 Container adaptors [container.adaptors]
23.6.6 Class template stack [stack]
23.6.6.4 Constructors with allocators [stack.cons.alloc]
If uses_allocator_v<container_type, Alloc> is false the constructors in this subclause shall not participate in overload resolution.
template<class Alloc> constexpr explicit stack(const Alloc& a);
Effects: Initializes c with a.
template<class Alloc> constexpr stack(const container_type& cont, const Alloc& a);
Effects: Initializes c with cont as the first argument and a as the second argument.
template<class Alloc> constexpr stack(container_type&& cont, const Alloc& a);
Effects: Initializes c with std::move(cont) as the first argument and a as the second argument.
template<class Alloc> constexpr stack(const stack& s, const Alloc& a);
Effects: Initializes c with s.c as the first argument and a as the second argument.
template<class Alloc> constexpr stack(stack&& s, const Alloc& a);
Effects: Initializes c with std::move(s.c) as the first argument and a as the second argument.
template<class InputIterator, class Alloc> constexpr stack(InputIterator first, InputIterator last, const Alloc& alloc);
Effects: Initializes c withfirst as the first argument,last as the second argument, andalloc as the third argument.
template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<T> R, class Alloc> constexpr stack(from_range_t, R&& rg, const Alloc& a);
Effects: Initializesc with ranges::to(std::forward(rg), a).