]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - acinclude/ax_cxx_compile_stdcxx_11.m4
Source Format Enforcement (#763)
[thirdparty/squid.git] / acinclude / ax_cxx_compile_stdcxx_11.m4
index 163a4c646f762b5ec14674cb0dffbd0620850413..cd5ced7dadd54b1b2259f2cec99c874bce794ef6 100644 (file)
@@ -1,3 +1,10 @@
+## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
 # ============================================================================
 #  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
 # ============================================================================
 #serial 4
 
 m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
-  template <typename T>
+    template <typename T>
     struct check
     {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+      static_assert(sizeof(int) <= sizeof(T), "not big enough"); // GCC 4.3+
     };
 
+#if WHEN_SQUID_HAS_MANDATORY_GCC_4_789_SUPPORT
     struct Base {
     virtual void f() {}
     };
     struct Child : public Base {
-    virtual void f() override {}
+    virtual void f() override {} // GCC 4.7+
     };
+#endif
 
-    typedef check<check<bool>> right_angle_brackets;
+    typedef check<check<bool>> right_angle_brackets; // GCC 4.3+
 
     int a;
-    decltype(a) b;
+    decltype(a) b; // GCC 4.3+
 
     typedef check<int> check_type;
     check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
+    check_type&& cr = static_cast<check_type&&>(c); // GCC 4.3+
 
-    auto d = a;
-    auto l = [](){};
+    auto d = a;      // GCC 4.4+
+#if WHEN_SQUID_HAS_MANDATORY_GCC_4_789_SUPPORT
+    auto l = [](){}; // GCC 4.5+ (void lambda seems not to be documented)
+#endif
 ]])
 
 AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl