Opened 7 years ago
Closed 5 years ago
#12027 closed Bugs (wontfix)
is_base_of<B, D> should work ehen B is incomplete
Reported by: | akrzemi1 | Owned by: | John Maddock |
---|---|---|---|
Milestone: | To Be Determined | Component: | type_traits |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The Standard ([meta.rel]) requires that in is_base_of<B, D> D must be a complete type, but it does not require the same of B. This makes sense, because if we compare a complete type D and an incomplete type B, the former is surely not derived from the latter.
In contrast, boost::is_base_of imposes an additional constraint that B must also be complete:
Can you remove this extra constraint? It appears to be spoiling one Boost.Optional tests:
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I've been having a look at this and:
- There is no restriction on B being complete as long as we have a working compiler intrinsic that supports this.
- The Oracle compiler supports the
__oracle_is_base_of intrinsic
, but it's use is even more restricted/broken. So we don't use it, as it makes things even worse than they are already.
Sorry, but I don't see any easy way to fix this.
Note:
See TracTickets
for help on using tickets.
Checked 1.55 boost version, works with incomplete B.