Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++noexceptSingle-choice MCQ

What is the effect of declaring this swap as noexcept, given its body?

struct Widget { std::string a; void swap(Widget& o) noexcept { using std::swap; swap(a, o.a); // std::string::swap is noexcept } };