fixed android setup

added missing c++11 methods
This commit is contained in:
kazu
2016-07-15 15:49:58 +02:00
parent b188cb992c
commit 719a66937e
12 changed files with 86 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
#ifndef DEBUG_H
#define DEBUG_H
#ifndef NAV_DEBUG_H
#define NAV_DEBUG_H
#include <QDebug>
@@ -13,4 +13,4 @@ public:
}
};
#endif // DEBUG_H
#endif // NAV_DEBUG_H

View File

@@ -2,12 +2,49 @@
#define FIXC11_H
#include <cmath>
#include <sstream>
//namespace std {
namespace std {
// template <typename T> T sqrt(const T val) {return ::sqrt(val);}
//template <typename T> T sqrt(const T val) {return ::sqrt(val);}
//}
//}
template <typename T> string to_string(const T val) {
stringstream ss;
ss << val;
return ss.str();
}
template <typename T> T round(const T val) {
return ::round(val);
}
// http://stackoverflow.com/questions/19478687/no-member-named-stoi-in-namespace-std
int stoi(const std::string& str) {
std::istringstream is(str);
int val; is >> val; return val;
}
// analog zu oben
float stof(const std::string& str) {
std::istringstream is(str);
float val; is >> val; return val;
}
// analog zu oben
double stod(const std::string& str) {
std::istringstream is(str);
double val; is >> val; return val;
}
// analog zu oben
uint64_t stol(const std::string& str) {
std::istringstream is(str);
uint64_t val; is >> val; return val;
}
}
#endif // FIXC11_H