Rename macro CXX_STD_VER -> SQLPP_CXX_STD

This commit is contained in:
MeanSquaredError
2024-09-03 12:04:43 +03:00
committed by Roland Bock
parent f56564d632
commit a710e8bd89
10 changed files with 27 additions and 27 deletions

View File

@@ -1,7 +0,0 @@
#pragma once
#ifdef _MSVC_LANG
#define CXX_STD_VER _MSVC_LANG
#else
#define CXX_STD_VER __cplusplus
#endif

View File

@@ -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)...));

View File

@@ -0,0 +1,7 @@
#pragma once
#ifdef _MSVC_LANG
#define SQLPP_CXX_STD _MSVC_LANG
#else
#define SQLPP_CXX_STD __cplusplus
#endif

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -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