How do I write an ADL-enabled trailing return type, or noexcept specification?

后端 未结 4 1910
野趣味
野趣味 2020-12-04 16:47

Imagine I\'m writing some container template or something. And the time comes to specialize std::swap for it. As a good citizen, I\'ll enable ADL by doing somet

4条回答
  •  误落风尘
    2020-12-04 17:02

    C++17 has solved this particular use case with std::is_nothrow_swappable: http://en.cppreference.com/w/cpp/types/is_swappable

提交回复
热议问题