File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1553,6 +1553,7 @@ class unique_resource
15531553 *
15541554 * **Effects:** As if `left.swap(right)`.
15551555 */
1556+ #if !defined(BOOST_MSVC) || (BOOST_MSVC < 1910 || BOOST_MSVC >= 1920)
15561557#if !defined(BOOST_SCOPE_DOXYGEN)
15571558 template < bool Requires = detail::is_swappable< data >::value >
15581559 friend typename std::enable_if< Requires >::type
@@ -1564,6 +1565,14 @@ class unique_resource
15641565 {
15651566 left.swap (right);
15661567 }
1568+ #else // !defined(BOOST_MSVC) || (BOOST_MSVC < 1910 || BOOST_MSVC >= 1920)
1569+ // MSVC 14.1 has broken name lookup in the context of the noexcept specifier of a friend function
1570+ template < bool Requires = detail::is_swappable< data >::value, bool Noexcept = detail::is_nothrow_swappable< data >::value >
1571+ friend typename std::enable_if< Requires >::type swap (unique_resource& left, unique_resource& right) noexcept (Noexcept)
1572+ {
1573+ left.swap (right);
1574+ }
1575+ #endif // !defined(BOOST_MSVC) || (BOOST_MSVC < 1910 || BOOST_MSVC >= 1920)
15671576
15681577// ! \cond
15691578private:
You can’t perform that action at this time.
0 commit comments