mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-05 04:30:43 -06:00
Rename macro CXX_STD_VER -> SQLPP_CXX_STD
This commit is contained in:
committed by
Roland Bock
parent
f56564d632
commit
a710e8bd89
@@ -1,7 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSVC_LANG
|
||||
#define CXX_STD_VER _MSVC_LANG
|
||||
#else
|
||||
#define CXX_STD_VER __cplusplus
|
||||
#endif
|
||||
@@ -26,7 +26,7 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sqlpp11/compat/cxx_std_ver.h>
|
||||
#include <sqlpp11/compat/sqlpp_cxx_std.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace sqlpp
|
||||
template <typename T, typename... Args>
|
||||
std::unique_ptr<T> make_unique(Args&&... args)
|
||||
{
|
||||
#if CXX_STD_VER >= 201402L
|
||||
#if SQLPP_CXX_STD >= 201402L
|
||||
return std::make_unique<T>(std::forward<Args>(args)...);
|
||||
#else
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
|
||||
7
include/sqlpp11/compat/sqlpp_cxx_std.h
Normal file
7
include/sqlpp11/compat/sqlpp_cxx_std.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSVC_LANG
|
||||
#define SQLPP_CXX_STD _MSVC_LANG
|
||||
#else
|
||||
#define SQLPP_CXX_STD __cplusplus
|
||||
#endif
|
||||
@@ -26,11 +26,11 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sqlpp11/compat/cxx_std_ver.h>
|
||||
#include <sqlpp11/compat/sqlpp_cxx_std.h>
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#if CXX_STD_VER >= 201703L
|
||||
#if SQLPP_CXX_STD >= 201703L
|
||||
#include <string_view>
|
||||
#endif
|
||||
#include <sqlpp11/type_traits.h>
|
||||
@@ -53,7 +53,7 @@ namespace sqlpp
|
||||
text_operand(_value_t t) : _t(std::move(t))
|
||||
{
|
||||
}
|
||||
#if CXX_STD_VER >= 201703L
|
||||
#if SQLPP_CXX_STD >= 201703L
|
||||
// allow construction from an std::string_view
|
||||
text_operand(std::string_view t) : _t(t)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sqlpp11/compat/cxx_std_ver.h>
|
||||
#include <sqlpp11/compat/sqlpp_cxx_std.h>
|
||||
|
||||
#include <sqlpp11/data_types/parameter_value.h>
|
||||
#include <sqlpp11/data_types/parameter_value_base.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <sqlpp11/data_types/text/wrap_operand.h>
|
||||
#include <sqlpp11/data_types/text/operand.h>
|
||||
|
||||
#if CXX_STD_VER >= 201703L
|
||||
#if SQLPP_CXX_STD >= 201703L
|
||||
#include <string_view>
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace sqlpp
|
||||
target._bind_text_parameter(index, &_value, _is_null);
|
||||
}
|
||||
|
||||
#if CXX_STD_VER >= 201703L
|
||||
#if SQLPP_CXX_STD >= 201703L
|
||||
parameter_value_base& operator=(const std::string_view& val)
|
||||
{
|
||||
_value = val;
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sqlpp11/compat/cxx_std_ver.h>
|
||||
#include <sqlpp11/compat/sqlpp_cxx_std.h>
|
||||
|
||||
#include <utility>
|
||||
#if CXX_STD_VER >= 201703L
|
||||
#if SQLPP_CXX_STD >= 201703L
|
||||
#include <string_view>
|
||||
#endif
|
||||
#include <sqlpp11/type_traits.h>
|
||||
@@ -39,7 +39,7 @@ namespace sqlpp
|
||||
{
|
||||
struct text_operand;
|
||||
|
||||
#if CXX_STD_VER >= 201703L
|
||||
#if SQLPP_CXX_STD >= 201703L
|
||||
using checked_type = std::string_view;
|
||||
#else
|
||||
using checked_type = std::string;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sqlpp11/compat/cxx_std_ver.h>
|
||||
#include <sqlpp11/compat/sqlpp_cxx_std.h>
|
||||
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
@@ -83,7 +83,7 @@ namespace sqlpp
|
||||
class iterator
|
||||
{
|
||||
public:
|
||||
#if CXX_STD_VER >= 202002L
|
||||
#if SQLPP_CXX_STD >= 202002L
|
||||
using iterator_concept = std::input_iterator_tag;
|
||||
#else
|
||||
// LegacyInputIterator describes best our iterator's capabilities. However our iterator does not
|
||||
|
||||
Reference in New Issue
Block a user