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: cskludev@… 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).

Change History (2)

comment:1 by Steven Watanabe, 13 years ago

Component: Nonetype_traits
Owner: set to John Maddock

That isn't an error. It's a warning.

comment:2 by John Maddock, 13 years ago

Resolution: fixed
Status: newclosed

(In [60525]) Fixes #4000.

Note: See TracTickets for help on using tickets.