8 #ifndef SOCI_SQLITE3_COMMON_H_INCLUDED 9 #define SOCI_SQLITE3_COMMON_H_INCLUDED 28 std::vector<T> *v =
static_cast<std::vector<T> *
>(p);
35 std::vector<T> *v =
static_cast<std::vector<T> *
>(p);
45 int const converted = std::sscanf(buf,
"%" LL_FMT_FLAGS "d%n", &t, &n);
46 if (converted == 1 && static_cast<std::size_t>(n) == std::strlen(buf))
51 const T max = (std::numeric_limits<T>::max)();
52 const T min = (std::numeric_limits<T>::min)();
53 if (t <= static_cast<long long>(max) &&
54 t >=
static_cast<long long>(min))
56 return static_cast<T
>(t);
67 unsigned long long t(0);
69 int const converted = std::sscanf(buf,
"%" LL_FMT_FLAGS "u%n", &t, &n);
70 if (converted == 1 && static_cast<std::size_t>(n) == std::strlen(buf))
75 T
const max = (std::numeric_limits<T>::max)();
76 if (t <= static_cast<unsigned long long>(max))
78 return static_cast<T
>(t);
87 #endif // SOCI_SQLITE3_COMMON_H_INCLUDED T string_to_integer(char const *buf)
T string_to_unsigned_integer(char const *buf)
SOCI_SQLITE3_DECL sqlite3_backend_factory const sqlite3
void parse_std_tm(char const *buf, std::tm &t)
std::size_t get_vector_size(void *p)
void resize_vector(void *p, std::size_t sz)