Bug 1326145 - Remove HAVE_CPP_AMBIGUITY_RESOLVING_USING. r?glandium draft
authorXidorn Quan <me@upsuper.org>
Thu, 29 Dec 2016 18:05:20 +1100
changeset 454388 2488762f8c1b196e12114cf0f1036847ee62fbd2
parent 454387 df543cecccfd10f91d136e07eb9c21f5ac7f6bef
child 540692 2c53ca35dd4f5ca3901f9621b819a793247706d6
push id39911
push userxquan@mozilla.com
push dateThu, 29 Dec 2016 07:07:06 +0000
reviewersglandium
bugs1326145
milestone53.0a1
Bug 1326145 - Remove HAVE_CPP_AMBIGUITY_RESOLVING_USING. r?glandium MozReview-Commit-ID: FVDZjTJ4ZhA
js/src/old-configure.in
layout/style/ImportRule.h
old-configure.in
xpcom/xpcom-config.h.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1301,36 +1301,16 @@ if test "$GNU_CC"; then
     else
         ARM_ABI_PREFIX=oabi-
     fi
   fi
 
   TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
 fi
 
-dnl Check to see if we can resolve ambiguity with |using|.
-AC_CACHE_CHECK(whether the C++ \"using\" keyword resolves ambiguity,
-               ac_cv_cpp_ambiguity_resolving_using,
-               [AC_TRY_COMPILE(class X {
-                                 public: int go(const X&) {return 3;}
-                                         int jo(const X&) {return 3;}
-                               };
-                               class Y : public X {
-                                 public:  int go(int) {return 2;}
-                                          int jo(int) {return 2;}
-                                          using X::jo;
-                                 private: using X::go;
-                               };,
-                               X x; Y y; y.jo(x);,
-                               ac_cv_cpp_ambiguity_resolving_using=yes,
-                               ac_cv_cpp_ambiguity_resolving_using=no)])
-if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
-   AC_DEFINE(HAVE_CPP_AMBIGUITY_RESOLVING_USING)
-fi
-
 dnl See if a dynamic_cast to void* gives the most derived object.
 AC_CACHE_CHECK(for C++ dynamic_cast to void*,
                ac_cv_cpp_dynamic_cast_void_ptr,
                [AC_TRY_RUN([class X { int i; public: virtual ~X() { } };
                             class Y { int j; public: virtual ~Y() { } };
                             class Z : public X, public Y { int k; };
 
                             int main() {
--- a/layout/style/ImportRule.h
+++ b/layout/style/ImportRule.h
@@ -34,19 +34,17 @@ private:
   ImportRule(const ImportRule& aCopy);
   ~ImportRule();
 public:
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(ImportRule, mozilla::css::Rule)
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   DECL_STYLE_RULE_INHERIT
 
-#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING
   using Rule::GetStyleSheet; // unhide since nsIDOMCSSImportRule has its own GetStyleSheet
-#endif
 
   // Rule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
 #endif
   virtual int32_t GetType() const override;
   virtual already_AddRefed<Rule> Clone() const override;
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -1804,36 +1804,16 @@ if test "$GNU_CC"; then
     else
         ARM_ABI_PREFIX=oabi-
     fi
   fi
 
   TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
 fi
 
-dnl Check to see if we can resolve ambiguity with |using|.
-AC_CACHE_CHECK(whether the C++ \"using\" keyword resolves ambiguity,
-               ac_cv_cpp_ambiguity_resolving_using,
-               [AC_TRY_COMPILE(class X {
-                                 public: int go(const X&) {return 3;}
-                                         int jo(const X&) {return 3;}
-                               };
-                               class Y : public X {
-                                 public:  int go(int) {return 2;}
-                                          int jo(int) {return 2;}
-                                          using X::jo;
-                                 private: using X::go;
-                               };,
-                               X x; Y y; y.jo(x);,
-                               ac_cv_cpp_ambiguity_resolving_using=yes,
-                               ac_cv_cpp_ambiguity_resolving_using=no)])
-if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
-   AC_DEFINE(HAVE_CPP_AMBIGUITY_RESOLVING_USING)
-fi
-
 dnl See if a dynamic_cast to void* gives the most derived object.
 AC_CACHE_CHECK(for C++ dynamic_cast to void*,
                ac_cv_cpp_dynamic_cast_void_ptr,
                [AC_TRY_RUN([class X { int i; public: virtual ~X() { } };
                             class Y { int j; public: virtual ~Y() { } };
                             class Z : public X, public Y { int k; };
 
                             int main() {
@@ -5647,17 +5627,16 @@ fi
 AC_SUBST(MOZILLA_VERSION)
 
 dnl Spit out some output
 dnl ========================================================
 
 dnl The following defines are used by xpcom
 _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES
 CPP_THROW_NEW
-HAVE_CPP_AMBIGUITY_RESOLVING_USING
 HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
 HAVE_CPP_PARTIAL_SPECIALIZATION
 HAVE_GETPAGESIZE
 HAVE_ICONV
 HAVE_ICONV_WITH_CONST_INPUT
 HAVE_MBRTOWC
 HAVE_WCRTOMB
 HAVE_STATVFS64
--- a/xpcom/xpcom-config.h.in
+++ b/xpcom/xpcom-config.h.in
@@ -7,18 +7,15 @@
 #ifndef _XPCOM_CONFIG_H_
 #define _XPCOM_CONFIG_H_
 
 /* Define this to throw() if the compiler complains about 
  * constructors returning NULL
  */
 #undef CPP_THROW_NEW
 
-/* Define if the c++ compiler can resolve ambiguity with |using| */
-#undef HAVE_CPP_AMBIGUITY_RESOLVING_USING
-
 /* Define if a dyanmic_cast to void* gives the most derived object */
 #undef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
 
 /* Define to a string describing the XPCOM ABI in use */
 #undef TARGET_XPCOM_ABI
 
 #endif /* _XPCOM_CONFIG_H_ */