mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Add include for std::free from <cstdlib>
This commit is contained in:
parent
14b1a3fe0c
commit
9819699105
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include <cstdlib>
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#include <cxxabi.h>
|
||||
|
@ -41,7 +42,7 @@ std::string get_type_name(const std::type_info& id) {
|
|||
int status;
|
||||
char* unmangled = abi::__cxa_demangle(id.name(), 0, 0, &status);
|
||||
std::string realname = unmangled;
|
||||
free(unmangled);
|
||||
std::free(unmangled);
|
||||
return realname;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user