[Boost-bugs] [ boost-Bugs-1358600 ] lexical_cast & pure virtual functions & VC 8 STL

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: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1358600&group_id=7586 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 { public: virtual void out(std::ostream &) const = 0; }; class B: public A { public: virtual void out(std::ostream &O) const { O << "B"; } }; std::ostream &operator<<(std::ostream &O, const A &a) { a.out(O); return O; }; int main() { const A &a = B(); boost::lexical_cast<std::string>(a); 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: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1358600&group_id=7586 ------------------------------------------------------- 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: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs
participants (1)
-
SourceForge.net