From: Francesco Chemolli Date: Wed, 26 Aug 2015 15:32:31 +0000 (+0200) Subject: Revert c++11 override keyword detection support X-Git-Tag: SQUID_4_0_1~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd055a194c37c50e9fa09361873128ba32a9a1df;p=thirdparty%2Fsquid.git Revert c++11 override keyword detection support --- diff --git a/acinclude/ax_cxx_0x_types.m4 b/acinclude/ax_cxx_0x_types.m4 index f58b119274..270d378e2f 100644 --- a/acinclude/ax_cxx_0x_types.m4 +++ b/acinclude/ax_cxx_0x_types.m4 @@ -80,26 +80,3 @@ AC_DEFUN([AX_CXX_TYPE_UNIFORM_DISTRIBUTIONS],[ AC_LANG_POP ]) - -AC_DEFUN([AX_CXX11_SUPPORTS_OVERRIDE_KEYWORD],[ - AC_REQUIRE([AC_PROG_CXX]) - AC_LANG_PUSH([C++]) - AC_CACHE_CHECK([whether the c++11 compiler supports the override keyword], - [squid_cv_cxx11_supports_override],[ - AC_TRY_COMPILE([],[ -class Base { - public: - virtual void method() {} -}; -class Derived : public Base { - public: - virtual void method() override {} -}; -Derived d; d.method(); - ],[squid_cv_cxx11_supports_override=yes],[squid_cv_cxx11_supports_override=no]) - ]) - AC_LANG_POP - SQUID_DEFINE_BOOL([HAVE_CXX11_OVERRIDE_KEYWORD],[$squid_cv_cxx11_supports_override], - [Define if the c++11 compiler supports c++ override keyword for class methods]) -]) - diff --git a/compat/types.h b/compat/types.h index f0418d7592..c04777d9a4 100644 --- a/compat/types.h +++ b/compat/types.h @@ -181,12 +181,5 @@ typedef long mtyp_t; #define xuniform_real_distribution std::tr1::uniform_real #endif -#if HAVE_CXX11_OVERRIDE_KEYWORD -///use in place of c++11 "override" keyword, will expand to keyword if compiler supports -#define OVERRIDE override -#else -#define OVERRIDE -#endif - #endif /* SQUID_TYPES_H */ diff --git a/configure.ac b/configure.ac index 323afbdd4e..d0c55fed2b 100644 --- a/configure.ac +++ b/configure.ac @@ -2939,7 +2939,6 @@ dnl Some C++11 types we try to use AX_CXX_TYPE_NULLPTR AX_CXX_TYPE_UNIQUE_PTR AX_CXX_TYPE_UNIFORM_DISTRIBUTIONS -AX_CXX11_SUPPORTS_OVERRIDE_KEYWORD dnl On Solaris 9 x86, gcc may includes a "fixed" set of old system include files dnl that is incompatible with the updated Solaris header files. diff --git a/src/acl/Tree.h b/src/acl/Tree.h index 0bddc9d3c9..c13e7afdfb 100644 --- a/src/acl/Tree.h +++ b/src/acl/Tree.h @@ -41,7 +41,7 @@ public: protected: /// Acl::OrNode API - virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const OVERRIDE; + virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const override; allow_t actionAt(const Nodes::size_type pos) const; /// if not empty, contains actions corresponding to InnerNode::nodes