id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 514,lexical_cast & pure virtual functions & VC 8 STL,sergey_shandar,alnsn,"{{{ VC 8.0 can't compile the valid code: ===== ===== #include 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(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? }}}",Bugs,closed,,None,None,,Fixed,,