mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Remove checks for MSVC versions older than MSVS 2015
These compilers are not supported anyhow, so remove workarounds for them.
This commit is contained in:
@@ -28,13 +28,7 @@ template <typename T>
|
||||
bool cstring_to_integer(T& result, char const* buf)
|
||||
{
|
||||
char * end;
|
||||
|
||||
// No strtoll() on MSVC versions prior to Visual Studio 2013
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
long long t = strtoll(buf, &end, 10);
|
||||
#else
|
||||
long long t = _strtoi64(buf, &end, 10);
|
||||
#endif
|
||||
const long long t = strtoll(buf, &end, 10);
|
||||
|
||||
if (end == buf || *end != '\0')
|
||||
return false;
|
||||
@@ -57,13 +51,7 @@ template <typename T>
|
||||
bool cstring_to_unsigned(T& result, char const* buf)
|
||||
{
|
||||
char * end;
|
||||
|
||||
// No strtoll() on MSVC versions prior to Visual Studio 2013
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
unsigned long long t = strtoull(buf, &end, 10);
|
||||
#else
|
||||
unsigned long long t = _strtoui64(buf, &end, 10);
|
||||
#endif
|
||||
const unsigned long long t = strtoull(buf, &end, 10);
|
||||
|
||||
if (end == buf || *end != '\0')
|
||||
return false;
|
||||
|
||||
@@ -29,43 +29,12 @@
|
||||
#define LL_FMT_FLAGS "ll"
|
||||
#endif
|
||||
|
||||
// Portability hacks for Microsoft Visual C++ compiler
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
|
||||
//Disables warnings about STL objects need to have dll-interface and/or
|
||||
//base class must have dll interface
|
||||
#pragma warning(disable:4251 4275)
|
||||
|
||||
|
||||
// Define if you have the vsnprintf variants.
|
||||
#if _MSC_VER < 1500
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
// Define if you have the snprintf variants.
|
||||
#if _MSC_VER < 1900
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
// Define if you have the strtoll and strtoull variants.
|
||||
#if _MSC_VER < 1300
|
||||
# error "Visual C++ versions prior 1300 don't support _strtoi64 and _strtoui64"
|
||||
#elif _MSC_VER >= 1300 && _MSC_VER < 1800
|
||||
namespace std {
|
||||
inline long long strtoll(char const* str, char** str_end, int base)
|
||||
{
|
||||
return _strtoi64(str, str_end, base);
|
||||
}
|
||||
|
||||
inline unsigned long long strtoull(char const* str, char** str_end, int base)
|
||||
{
|
||||
return _strtoui64(str, str_end, base);
|
||||
}
|
||||
}
|
||||
#endif // _MSC_VER < 1800
|
||||
#endif // _MSC_VER
|
||||
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
#include <stdlib.h>
|
||||
namespace std {
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1500)
|
||||
#undef SECTION
|
||||
#define SECTION(name) INTERNAL_CATCH_SECTION(name, "dummy-for-vc8")
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <clocale>
|
||||
#include <cstdint>
|
||||
|
||||
Reference in New Issue
Block a user