mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
yaaay, mingw.....
This commit is contained in:
parent
769faeec64
commit
3a12435b17
|
@ -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 <cctype>
|
||||
#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6)
|
||||
extern "C" {
|
||||
#include <ctype.h>
|
||||
}
|
||||
#endif // MinGW is on some stuff
|
||||
#include <locale>
|
||||
|
||||
namespace sol {
|
||||
|
@ -5579,6 +5584,8 @@ namespace sol {
|
|||
#if defined(__GNUC__) || defined(__clang__)
|
||||
template <typename T, class seperator_mark = int>
|
||||
inline std::string ctti_get_type_name() {
|
||||
// cardinal sins from MINGW
|
||||
using namespace std;
|
||||
const static std::array<std::string, 2> 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]);
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
#include <string>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#if defined(__GNUC__) && defined(__MINGW32__) && (__GNUC__ < 6)
|
||||
extern "C" {
|
||||
#include <ctype.h>
|
||||
}
|
||||
#endif // MinGW is on some stuff
|
||||
#include <locale>
|
||||
|
||||
namespace sol {
|
||||
|
@ -32,6 +37,8 @@ namespace sol {
|
|||
#if defined(__GNUC__) || defined(__clang__)
|
||||
template <typename T, class seperator_mark = int>
|
||||
inline std::string ctti_get_type_name() {
|
||||
// cardinal sins from MINGW
|
||||
using namespace std;
|
||||
const static std::array<std::string, 2> 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]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user