@@ -1216,7 +1216,7 @@ auto polymorphic_base(meta::type_declaration& t) -> void
12161216 " polymorphic base types may not copy or move; consider a virtual clone() instead" );
12171217 if (CPP2_UFCS_0 (is_destructor, mf)) {
12181218 has_dtor = true ;
1219- CPP2_UFCS (require, mf, (CPP2_UFCS_0 (is_public, mf) && CPP2_UFCS_0 (is_virtual, mf))
1219+ CPP2_UFCS (require, mf, (( CPP2_UFCS_0 (is_public, mf) || CPP2_UFCS_0 (is_default_access, mf) ) && CPP2_UFCS_0 (is_virtual, mf))
12201220 || (CPP2_UFCS_0 (is_protected, mf) && !(CPP2_UFCS_0 (is_virtual, mf))),
12211221 " a polymorphic base type destructor must be public and virtual, or protected and nonvirtual" );
12221222 }
@@ -1302,7 +1302,7 @@ auto basic_value(meta::type_declaration& t) -> void
13021302 has_default_ctor |= CPP2_UFCS_0 (is_default_constructor, mf);
13031303 CPP2_UFCS (require, mf, !(CPP2_UFCS_0 (is_protected, mf)) && !(CPP2_UFCS_0 (is_virtual, mf)),
13041304 " a value type may not have a protected or virtual function" );
1305- CPP2_UFCS (require, mf, !(CPP2_UFCS_0 (is_destructor, mf)) || CPP2_UFCS_0 (is_public, mf),
1305+ CPP2_UFCS (require, mf, !(CPP2_UFCS_0 (is_destructor, mf)) || CPP2_UFCS_0 (is_public, mf) || CPP2_UFCS_0 (is_default_access, mf) ,
13061306 " a value type may not have a non-public destructor" );
13071307 }
13081308
0 commit comments