mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 04:50:34 +05:00
Fix cross-platform archiving
This is a non-backward compatible change for archives on Windows!
This commit is contained in:
parent
9033de843b
commit
acf2b39680
@ -13,7 +13,15 @@ namespace ngcore
|
||||
|
||||
#ifdef WIN32
|
||||
// windows does demangling in typeid(T).name()
|
||||
NGCORE_API std::string Demangle(const char* typeinfo) { return typeinfo; }
|
||||
NGCORE_API std::string Demangle(const char* typeinfo) {
|
||||
std::string name = typeinfo;
|
||||
// remove "class " and "struct " at beginning of type names to be consistent with demangled names of gcc/clang
|
||||
if(name.find("class ") == 0)
|
||||
name.erase(0,6);
|
||||
if(name.find("struct ") == 0)
|
||||
name.erase(0,7);
|
||||
return name;
|
||||
}
|
||||
#else
|
||||
NGCORE_API std::string Demangle(const char* typeinfo)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user