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])
+])
+
#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 */
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.
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