Hi I have the following code : class MyClass { private: friend class boost::serialization::access; template<class Archive> void serialize(Archive &ar, const unsigned int version) {} }; class MyClass2 : public MyClass {}; MyClass2* ss = new MyClass2; std::ofstream ofs("C:\\test.xml"); boost::archive::xml_oarchive oa(ofs); oa & boost::serialization::make_nvp("test",ss); I am serializing trough the derived class pointer. The derived class doesnot have serialize function. The Base have. And I was expecting compiler to give me error that MyClass2 doesnot have serialize function. But this code compiles without errors. I am using vs2010. -- View this message in context: http://boost.2283326.n4.nabble.com/Compiler-does-not-give-error-for-missing-... Sent from the Boost - Users mailing list archive at Nabble.com.