diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index d6174ac2..4095405f 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2017-08-13 17:16:44.325943 UTC -// This header was generated with sol v2.18.0 (revision 7d2665e) +// Generated 2017-08-13 17:24:40.860735 UTC +// This header was generated with sol v2.18.0 (revision 769faee) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -5572,6 +5572,11 @@ namespace sol { // beginning of sol/demangle.hpp #include +#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6) +extern "C" { +#include +} +#endif // MinGW is on some stuff #include namespace sol { @@ -5579,6 +5584,8 @@ namespace sol { #if defined(__GNUC__) || defined(__clang__) template inline std::string ctti_get_type_name() { + // cardinal sins from MINGW + using namespace std; const static std::array removals = { { "{anonymous}", "(anonymous namespace)" } }; std::string name = __PRETTY_FUNCTION__; std::size_t start = name.find_first_of('['); @@ -5595,8 +5602,8 @@ namespace sol { if (start != std::string::npos) { name.erase(start - 2, name.length()); } - while (!name.empty() && std::isblank(name.front())) name.erase(name.begin()); - while (!name.empty() && std::isblank(name.back())) name.pop_back(); + while (!name.empty() && isblank(name.front())) name.erase(name.begin()); + while (!name.empty() && isblank(name.back())) name.pop_back(); for (std::size_t r = 0; r < removals.size(); ++r) { auto found = name.find(removals[r]); diff --git a/sol/demangle.hpp b/sol/demangle.hpp index da738d58..5379e3c2 100644 --- a/sol/demangle.hpp +++ b/sol/demangle.hpp @@ -25,6 +25,11 @@ #include #include #include +#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6) +extern "C" { +#include +} +#endif // MinGW is on some stuff #include namespace sol { @@ -32,6 +37,8 @@ namespace sol { #if defined(__GNUC__) || defined(__clang__) template inline std::string ctti_get_type_name() { + // cardinal sins from MINGW + using namespace std; const static std::array removals = { { "{anonymous}", "(anonymous namespace)" } }; std::string name = __PRETTY_FUNCTION__; std::size_t start = name.find_first_of('['); @@ -48,8 +55,8 @@ namespace sol { if (start != std::string::npos) { name.erase(start - 2, name.length()); } - while (!name.empty() && std::isblank(name.front())) name.erase(name.begin()); - while (!name.empty() && std::isblank(name.back())) name.pop_back(); + while (!name.empty() && isblank(name.front())) name.erase(name.begin()); + while (!name.empty() && isblank(name.back())) name.pop_back(); for (std::size_t r = 0; r < removals.size(); ++r) { auto found = name.find(removals[r]);