26 Containers library [containers]

26.6 Container adaptors [container.adaptors]

26.6.1 In general [container.adaptors.general]

The headers <queue> and <stack> define the container adaptors queue, priority_­queue, and stack.

The container adaptors each take a Container template parameter, and each constructor takes a Container reference argument. This container is copied into the Container member of each adaptor. If the container takes an allocator, then a compatible allocator may be passed in to the adaptor's constructor. Otherwise, normal copy or move construction is used for the container argument. The first template parameter T of the container adaptors shall denote the same type as Container​::​value_­type.

For container adaptors, no swap function throws an exception unless that exception is thrown by the swap of the adaptor's Container or Compare object (if any).

A deduction guide for a container adaptor shall not participate in overload resolution if any of the following are true: