TypeInfo.cxx
Go to the documentation of this file.00001 #include <sstream>
00002 #include <typeinfo>
00003 #include "Assert.hxx"
00004 #include "TypeInfo.hxx"
00005 #include <cstring>
00006
00007 namespace CLAM
00008 {
00009
00010 bool SameType(const std::type_info & type1, const std::type_info & type2)
00011 {
00012 if (strcmp(type1.name(),type2.name())!=0) return false;
00013 if (type1!=type2)
00014 {
00015 std::ostringstream os;
00016 os
00017 << "Two instances of type " << type1.name() << ".\n"
00018 << "Check that the type has a destructor defined in a cxx file or for different library versions.."
00019 << std::flush;
00020 ;
00021 CLAM_WARNING(true, os.str().c_str());
00022 }
00023 return true;
00024 }
00025
00026 }
00027