Fix a bug undeclared identifier alternative operator (https://github.com/jtv/libpqxx/pull/714) diff --git a/include/pqxx/internal/header-pre.hxx b/include/pqxx/internal/header-pre.hxx index 595a53b4..9d4c60e7 100644 --- a/include/pqxx/internal/header-pre.hxx +++ b/include/pqxx/internal/header-pre.hxx @@ -58,6 +58,18 @@ // Workarounds & definitions that need to be included even in library's headers #include "pqxx/config-public-compiler.h" +#if defined(_MSC_VER) +# define PQXX_CPLUSPLUS _MSVC_LANG +#else +# define PQXX_CPLUSPLUS __cplusplus +#endif + +// C++20: No longer needed. +// Enable ISO-646 alternative operaotr representations: "and" instead of "&&" +// etc. on older compilers. C++20 removes this header. +#if PQXX_CPLUSPLUS <= 201703L && __has_include() +# include +#endif #if defined(PQXX_HAVE_GCC_PURE) /// Declare function "pure": no side effects, only reads globals and its args.