@@ -464,7 +464,7 @@ namespace sqlite {
464
464
template <std::size_t N> inline database_binder::chain_type& operator <<(database_binder::chain_type& db, const char (&STR)[N]) { return db << std::string (STR); }
465
465
template <std::size_t N> inline database_binder::chain_type& operator <<(database_binder::chain_type& db, const char16_t (&STR)[N]) { return db << std::u16string (STR); }
466
466
467
- template <> database_binder::chain_type& operator <<(database_binder::chain_type& db, const std::string& txt) {
467
+ template <> inline database_binder::chain_type& operator <<(database_binder::chain_type& db, const std::string& txt) {
468
468
int hresult;
469
469
if ((hresult = sqlite3_bind_text (db->_stmt .get (), db->_inx , txt.data (), -1 , SQLITE_TRANSIENT)) != SQLITE_OK) {
470
470
exceptions::throw_sqlite_error (hresult);
@@ -474,7 +474,7 @@ namespace sqlite {
474
474
return db;
475
475
}
476
476
// std::u16string
477
- template <> void get_col_from_db (database_binder& db, int inx, std::u16string & w) {
477
+ template <> inline void get_col_from_db (database_binder& db, int inx, std::u16string & w) {
478
478
if (sqlite3_column_type (db._stmt .get (), inx) == SQLITE_NULL) {
479
479
w = std::u16string ();
480
480
} else {
@@ -495,7 +495,7 @@ namespace sqlite {
495
495
}
496
496
// boost::optinal support for NULL values
497
497
#ifdef _MODERN_SQLITE_BOOST_OPTIONAL_SUPPORT
498
- template <typename BoostOptionalT> database_binder::chain_type& operator <<(database_binder::chain_type& db, const boost::optional<BoostOptionalT>& val) {
498
+ template <typename BoostOptionalT> inline database_binder::chain_type& operator <<(database_binder::chain_type& db, const boost::optional<BoostOptionalT>& val) {
499
499
if (val) {
500
500
return operator << (std::move (db), std::move (*val));
501
501
}
@@ -508,7 +508,7 @@ namespace sqlite {
508
508
return db;
509
509
}
510
510
511
- template <typename BoostOptionalT> void get_col_from_db (database_binder& db, int inx, boost::optional<BoostOptionalT>& o) {
511
+ template <typename BoostOptionalT> inline void get_col_from_db (database_binder& db, int inx, boost::optional<BoostOptionalT>& o) {
512
512
if (sqlite3_column_type (db._stmt .get (), inx) == SQLITE_NULL) {
513
513
o.reset ();
514
514
} else {
@@ -524,7 +524,7 @@ namespace sqlite {
524
524
template <typename T> void operator >> (database_binder::chain_type&& db, T&& val) { db >> std::forward<T>(val); }
525
525
526
526
// Some ppl are lazy so we have a operator for proper prep. statemant handling.
527
- void operator ++(database_binder::chain_type& db, int ) { db->execute (); db->reset (); }
527
+ void inline operator ++(database_binder::chain_type& db, int ) { db->execute (); db->reset (); }
528
528
529
529
// Convert the rValue binder to a reference and call first op<<, its needed for the call that creates the binder (be carfull of recursion here!)
530
530
template <typename T> database_binder::chain_type& operator << (database_binder::chain_type&& db, const T& val) { return db << val; }
0 commit comments