@@ -1214,7 +1214,7 @@ class virtual_ptr<
12141214 detail::box_vptr<use_indirect_vptrs>(detail::null_vptr))),
12151215 obj (std::move(other.obj)) {
12161216 }
1217-
1217+ # ifdef __MRDOCS__
12181218 // ! Construct from a (const) smart pointer to a derived class
12191219 // !
12201220 // ! Set the object pointer with a copy of `other`. Set the v-table pointer
@@ -1243,18 +1243,25 @@ class virtual_ptr<
12431243 template <
12441244 class Other ,
12451245 typename = std::enable_if_t <
1246- BOOST_OPENMETHOD_DETAIL_UNLESS_MRDOCS
1247- SameSmartPtr<SmartPtr, Other, Registry> &&
1248- BOOST_OPENMETHOD_DETAIL_UNLESS_MRDOCS
1249- IsPolymorphic<typename Other::element_type, Registry> &&
1246+ SameSmartPtr<SmartPtr, Other, Registry> &&
1247+ IsPolymorphic<typename Other::element_type, Registry> &&
12501248 std::is_constructible_v<SmartPtr, const Other&>>>
1249+ #else
1250+ template <
1251+ class Other ,
1252+ typename = std::enable_if_t <
1253+ detail::SameSmartPtr<SmartPtr, Other, Registry> &&
1254+ detail::IsPolymorphic<typename Other::element_type, Registry> &&
1255+ std::is_constructible_v<SmartPtr, const Other&>>>
1256+ #endif
12511257 virtual_ptr (const Other& other)
12521258 : vp(detail::box_vptr<use_indirect_vptrs>(
12531259 other ? detail::acquire_vptr<Registry>(*other)
12541260 : detail::null_vptr)),
12551261 obj(other) {
12561262 }
12571263
1264+ #if __MRDOCS__
12581265 // ! Construct from a smart pointer to a derived class
12591266 // !
12601267 // ! Copy object pointer from `other` to `this`. Set the v-table pointer
@@ -1283,18 +1290,25 @@ class virtual_ptr<
12831290 template <
12841291 class Other ,
12851292 typename = std::enable_if_t <
1286- BOOST_OPENMETHOD_DETAIL_UNLESS_MRDOCS
1287- SameSmartPtr<SmartPtr, Other, Registry> &&
1288- BOOST_OPENMETHOD_DETAIL_UNLESS_MRDOCS
1289- IsPolymorphic<typename Other::element_type, Registry> &&
1293+ SameSmartPtr<SmartPtr, Other, Registry> &&
1294+ IsPolymorphic<typename Other::element_type, Registry> &&
1295+ std::is_constructible_v<SmartPtr, Other&>>>
1296+ #else
1297+ template <
1298+ class Other ,
1299+ typename = std::enable_if_t <
1300+ detail::SameSmartPtr<SmartPtr, Other, Registry> &&
1301+ detail::IsPolymorphic<typename Other::element_type, Registry> &&
12901302 std::is_constructible_v<SmartPtr, Other&>>>
1303+ #endif
12911304 virtual_ptr (Other& other)
12921305 : vp(detail::box_vptr<use_indirect_vptrs>(
12931306 other ? detail::acquire_vptr<Registry>(*other)
12941307 : detail::null_vptr)),
12951308 obj(other) {
12961309 }
12971310
1311+ #ifdef __MRDOCS__
12981312 // ! Move-construct from a smart pointer to a derived class
12991313 // !
13001314 // ! Move object pointer from `other` to `this`. Set the v-table pointer
@@ -1326,11 +1340,17 @@ class virtual_ptr<
13261340 template <
13271341 class Other ,
13281342 typename = std::enable_if_t <
1329- BOOST_OPENMETHOD_DETAIL_UNLESS_MRDOCS
1330- SameSmartPtr<SmartPtr, Other, Registry> &&
1331- BOOST_OPENMETHOD_DETAIL_UNLESS_MRDOCS
1332- IsPolymorphic<typename Other::element_type, Registry> &&
1343+ SameSmartPtr<SmartPtr, Other, Registry> &&
1344+ IsPolymorphic<typename Other::element_type, Registry> &&
13331345 std::is_constructible_v<SmartPtr, Other&&>>>
1346+ #else
1347+ template <
1348+ class Other ,
1349+ typename = std::enable_if_t <
1350+ detail::SameSmartPtr<SmartPtr, Other, Registry> &&
1351+ detail::IsPolymorphic<typename Other::element_type, Registry> &&
1352+ std::is_constructible_v<SmartPtr, Other&&>>>
1353+ #endif
13341354 virtual_ptr (Other&& other)
13351355 : vp(detail::box_vptr<use_indirect_vptrs>(
13361356 other ? detail::acquire_vptr<Registry>(*other)
0 commit comments