I believe the program below should compile: #include <cmath> #include <string>
struct employee : private std::string { }; struct manager : public employee { }; bool isnormal(const employee& e) { return false; } int main() { manager m; bool b = isnormal(m); } cmath: error: invalid cast from type 'manager' to type 'double' -- Summary: Client's isnormal function is broken by cmath Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hhinnant at apple dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25913