17 #ifndef PQXX_H_COMPILER_PUBLIC
18 #define PQXX_H_COMPILER_PUBLIC
20 #ifdef PQXX_HAVE_BOOST_SMART_PTR
21 #include <boost/smart_ptr.hpp>
26 #define PQXX_MOVE(value) (std::move(value))
28 #define PQXX_MOVE(value) (value)
31 #ifdef PQXX_HAVE_NOEXCEPT
32 #define PQXX_NOEXCEPT noexcept
34 #define PQXX_NOEXCEPT throw ()
37 #ifdef PQXX_HAVE_DELETED_OP
38 #define PQXX_DELETED_OP =delete
40 #define PQXX_DELETED_OP
43 #ifdef PQXX_HAVE_OVERRIDE
44 #define PQXX_OVERRIDE override
49 #ifdef PQXX_HAVE_FINAL
50 #define PQXX_FINAL final
67 #if defined(min) || defined(max)
68 #error "Oops: min() and/or max() are defined as preprocessor macros.\
69 Define NOMINMAX macro before including any system headers!"
77 #define PQXX_NOVTABLE __declspec(novtable)
83 #include "pqxx/config-public-compiler.h"
86 #if defined(__SUNPRO_CC)
87 #if __SUNPRO_CC_COMPAT < 5
88 #error "This compiler version is not capable of building libpqxx."
89 #endif // __SUNPRO_CC_COMPAT < 5
90 #define PQXX_PRIVATE __hidden
94 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_CONST)
95 #define PQXX_CONST __attribute__ ((const))
100 #if defined(PQXX_HAVE_DEPRECATED)
101 #define PQXX_DEPRECATED [[deprecated]]
102 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_DEPRECATED)
103 #define PQXX_DEPRECATED __attribute__ ((deprecated))
105 #define PQXX_DEPRECATED
108 #if defined(PQXX_HAVE_NORETURN)
109 #define PQXX_NORETURN [[noreturn]]
110 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_NORETURN)
111 #define PQXX_NORETURN __attribute__ ((noreturn))
112 #elif defined(_MSC_VER)
113 #define PQXX_NORETURN _declspec(noreturn)
115 #define PQXX_NORETURN
118 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_PURE)
119 #define PQXX_PURE __attribute__ ((pure))
134 #if !defined(PQXX_LIBEXPORT) && defined(PQXX_SHARED)
135 #define PQXX_LIBEXPORT __declspec(dllimport)
136 #endif // !PQXX_LIBEXPORT && PQXX_SHARED
143 #error "If you're using Visual C++, you'll need at least the 2010 version."
144 #endif // _MSC_VER < 1600
150 #if defined(PQXX_AUTOLINK)
151 #if defined(PQXX_PQ_STATIC)
153 #pragma comment(lib, "libpqd")
155 #pragma comment(lib, "libpq")
159 #pragma comment(lib, "libpqddll")
161 #pragma comment(lib, "libpqdll")
173 #if defined(PQXX_AUTOLINK) && !defined(PQXX_INTERNAL)
176 #pragma comment(lib, "libpqxxD")
178 #pragma comment(lib, "libpqxx")
180 #else // !PQXX_SHARED
182 #pragma comment(lib, "libpqxx_staticD")
184 #pragma comment(lib, "libpqxx_static")
192 #ifndef PQXX_LIBEXPORT
193 #define PQXX_LIBEXPORT
201 #ifndef PQXX_TYPENAME
202 #define PQXX_TYPENAME typename
205 #ifndef PQXX_NOVTABLE
206 #define PQXX_NOVTABLE