iwongu / sqlite3pp

SQLite3++ - C++ wrapper of SQLite3 API
MIT License
609 stars 177 forks source link

Replace long long int with sqlite3_int64 #32

Closed mutantdeveloper closed 8 years ago

mutantdeveloper commented 8 years ago

So GCC users don't have to static_cast on int64_t by defining sqlite3_int64.

iwongu commented 8 years ago

The intention is not to expose any sqlite3 definitions like sqlite3_int64 in sqlite3pp.

mutantdeveloper commented 8 years ago

more details? sqlite3_int64 is a typedef, not a macro.

The issue is that sqlite3pp assumes "long long int" is the one used by sqlite3 as 64-bit integer type. However it is not always true. Also with GCC on 64bit platform, int64_t is long int, and "long long int" could be 128bit in the future.

An alternative solution is to make a template version of bind() to handle all integral types. What do you think?