Opened 13 years ago
Closed 13 years ago
#4000 closed Bugs (fixed)
is_empty and is_stateless don't work with inaccessible destructors
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | type_traits |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The following code:
struct Indestructible { private:
~Indestructible() {}
};
bool isEmpty = boost::is_empty<Indestructible>::value; bool isStateless = boost::is_stateless<Indestructible>::value;
generates the following errors (on MSVC2008):
warning C4624: 'boost::detail::empty_helper_t1<T>' : destructor could not be generated because a base class destructor is inaccessible
This does compile on gcc (3.4.5 using MinGW).
Note:
See TracTickets
for help on using tickets.
That isn't an error. It's a warning.