This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/25913] New: Client's isnormal function is broken by cmath


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]