diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:25:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:25:44 +0200 |
commit | 8286ac511144e4f17d34eac9affb97e50646344a (patch) | |
tree | f1af7320d7b6be6be059216d0ad08ac7b4f73fd0 /xsd/libxsd/xsd/cxx/config.hxx | |
parent | a15cf65c44d5c224169c32ef5495b68c758134b7 (diff) |
Imported Upstream version 4.0.0upstream/4.0.0
Diffstat (limited to 'xsd/libxsd/xsd/cxx/config.hxx')
-rw-r--r-- | xsd/libxsd/xsd/cxx/config.hxx | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/xsd/libxsd/xsd/cxx/config.hxx b/xsd/libxsd/xsd/cxx/config.hxx index badfe03..076b107 100644 --- a/xsd/libxsd/xsd/cxx/config.hxx +++ b/xsd/libxsd/xsd/cxx/config.hxx @@ -1,6 +1,5 @@ // file : xsd/cxx/config.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_CONFIG_HXX @@ -8,7 +7,40 @@ #include <xsd/cxx/version.hxx> -// Macro to suppress unused variable warning. +// 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 |