diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-12-18 18:48:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-01-13 22:32:43 +0300 |
commit | 2615896faa646e5830abf2c269150e1165c66515 (patch) | |
tree | 7d95978ec0a83094c9462ed4e1f59d42f4ff8ddb /libxsd/libxsd/cxx/config.hxx | |
parent | 7420f85ea19b0562ffdd8123442f32bc8bac1267 (diff) |
Switch to build2
Diffstat (limited to 'libxsd/libxsd/cxx/config.hxx')
-rw-r--r-- | libxsd/libxsd/cxx/config.hxx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libxsd/libxsd/cxx/config.hxx b/libxsd/libxsd/cxx/config.hxx new file mode 100644 index 0000000..394c687 --- /dev/null +++ b/libxsd/libxsd/cxx/config.hxx @@ -0,0 +1,46 @@ +// file : libxsd/cxx/config.hxx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef LIBXSD_CXX_CONFIG_HXX +#define LIBXSD_CXX_CONFIG_HXX + +#include <libxsd/cxx/version.hxx> + +// Available C++11 features. +// +#ifdef XSD_CXX11 +#ifdef _MSC_VER +# if _MSC_VER >= 1600 +# define XSD_CXX11_NULLPTR +# if _MSC_VER >= 1800 +# define XSD_CXX11_TEMPLATE_ALIAS +# endif +# endif +#else +# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +# ifdef __GNUC__ +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4 +# define XSD_CXX11_NULLPTR +# endif +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || __GNUC__ > 4 +# define XSD_CXX11_TEMPLATE_ALIAS +# endif +# else +# define XSD_CXX11_NULLPTR +# define XSD_CXX11_TEMPLATE_ALIAS +# endif +# endif +#endif +#endif // XSD_CXX11 + +#ifdef XSD_CXX11 +# define XSD_AUTO_PTR std::unique_ptr +#else +# define XSD_AUTO_PTR std::auto_ptr +#endif + +// Macro to suppress the unused variable warning. +// +#define XSD_UNUSED(x) (void)x + +#endif // LIBXSD_CXX_CONFIG_HXX |