From 86382f4fe190be9800c3e1b39f118d3bdd635942 Mon Sep 17 00:00:00 2001 From: Christophe Palmann <christophe.palmann@c-s.fr> Date: Wed, 22 Oct 2014 14:33:38 +0200 Subject: [PATCH] muParserX 3.0.3 : #defines for c++03 compatibility --- Utilities/otbmuparserx/mpCompat.h | 46 ++++++++++++++++++++++++++++++ Utilities/otbmuparserx/mpDefines.h | 6 +--- Utilities/otbmuparserx/mpTypes.h | 1 + 3 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 Utilities/otbmuparserx/mpCompat.h diff --git a/Utilities/otbmuparserx/mpCompat.h b/Utilities/otbmuparserx/mpCompat.h new file mode 100644 index 0000000000..f8308dbe2d --- /dev/null +++ b/Utilities/otbmuparserx/mpCompat.h @@ -0,0 +1,46 @@ +/* + __________ ____ ___ + _____ __ _\______ \_____ _______ ______ __________\ \/ / + / \| | \ ___/\__ \\_ __ \/ ___// __ \_ __ \ / + | Y Y \ | / | / __ \| | \/\___ \\ ___/| | \/ \ + |__|_| /____/|____| (____ /__| /____ >\___ >__| /___/\ \ + \/ \/ \/ \/ \_/ + Copyright (C) 2014 Ingo Berg + All rights reserved. + + muParserX - A C++ math parser library with array and string support + Copyright (c) 2013, Ingo Berg + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef MUP_COMPAT_H +#define MUP_COMPAT_H + +// This file contains code to maintain backwards compatibility with older compilers. +#if __cplusplus <= 199711L + #define override + #define unique_ptr auto_ptr + #define nullptr NULL +#endif + +#endif + diff --git a/Utilities/otbmuparserx/mpDefines.h b/Utilities/otbmuparserx/mpDefines.h index 2cc5436873..a32967f799 100644 --- a/Utilities/otbmuparserx/mpDefines.h +++ b/Utilities/otbmuparserx/mpDefines.h @@ -41,10 +41,6 @@ #include <cassert> -//OTB-TEAM -#define nullptr 0 -#define unique_ptr auto_ptr -#define override #if defined(_UNICODE) #if !defined(_T) @@ -66,7 +62,7 @@ #endif /** \brief A macro containing the version of muParserX. */ -#define MUP_PARSER_VERSION _T("3.0.2 (20140714; release)") +#define MUP_PARSER_VERSION _T("3.0.3 (20141011; release)") /** \brief A macro for setting the parser namespace. */ #define MUP_NAMESPACE_START namespace mup { diff --git a/Utilities/otbmuparserx/mpTypes.h b/Utilities/otbmuparserx/mpTypes.h index abded5f8c1..0f3d32a886 100644 --- a/Utilities/otbmuparserx/mpTypes.h +++ b/Utilities/otbmuparserx/mpTypes.h @@ -49,6 +49,7 @@ //--- muParserX framework --------------------------------------------------- #include "suSortPred.h" // We need the string utils sorting predicates +#include "mpCompat.h" #include "mpDefines.h" #include "mpMatrix.h" -- GitLab