ThinSQLite++
A thin, safe and convenient modern C++ wrapper for SQLite API.
Loading...
Searching...
No Matches
basic_string_param< T > Class Template Reference

A reference to a null terminated string. More...

Public Member Functions

 basic_string_param (const T *str) noexcept
 Construct an instance from a raw pointer.
 
 basic_string_param (const std::basic_string< T > &str) noexcept
 Construct an instance from std::basic_string<T>::c_str()
 
 basic_string_param (std::nullptr_t) noexcept
 Construct an instance from a nullptr.
 
const T * c_str () const noexcept
 Returns the stored pointer.
 

Detailed Description

template<class T>
class thinsqlitepp::basic_string_param< T >

A reference to a null terminated string.

This class allows passing either a const T * or std::basic_string<T> to a function that internally needs a null terminated const T *

Note that this class has reference semantics. The string it refers to must be kept alive as long as the instance of this class is alive.

Template Parameters
Tcharacter type