Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2005-11-16 20:09:35

Bugs item #1358600, was opened at 2005-11-17 11:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sergey Shandar (sergey_shandar)
Assigned to: Nobody/Anonymous (nobody)
Summary: lexical_cast & pure virtual functions & VC 8 STL

Initial Comment:
VC 8.0 can't compile the valid code:
===== =====
#include <boost/lexical_cast.hpp>

class A
        virtual void out(std::ostream &) const = 0;

class B: public A
        virtual void out(std::ostream &O) const { O << "B"; }

std::ostream &operator<<(std::ostream &O, const A &a)
        return O;

int main()
        const A &a = B();
        return 0;
===== =====

The problem occurs in VC STL:
===== =====
c:\program files\microsoft visual studio
8\vc\include\limits(102) : error C2259: 'A' : cannot
instantiate abstract class
===== =====
However, should boost::lexical_cast use
std::numeric_cast in this case?


You can respond by visiting:

This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at