The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
Some types support being swapped but may not have declared their std::swap overloads when Poco/Optional.h is first included. This is the case for instance with
#include <Poco/Optional.h>
#include <array>
using Problematic = Poco::Optional<std::array<int, 42> >;
With an unqualified call to swap, preceded by using std::swap, we allow argument-dependent lookup to find suitable implementations of swap.
Some types support being swapped but may not have declared their
std::swap
overloads whenPoco/Optional.h
is first included. This is the case for instance withWith an unqualified call to
swap
, preceded byusing std::swap
, we allow argument-dependent lookup to find suitable implementations ofswap
.