зеркало из https://github.com/mozilla/gecko-dev.git
Make the test for HAVE_CPP_ACCESS_CHANGING_USING test both for cases that should and should not compile. Fixes nsDerivedSafe on gcc 2.96 and gcc 3. r=seawood sr=bryner b=66134
This commit is contained in:
Родитель
de78b20e51
Коммит
aafe6686ca
26
configure.in
26
configure.in
|
@ -2631,18 +2631,22 @@ dnl supports it well enough to allow us to use it to change access, but not
|
||||||
dnl to resolve ambiguity. The next two tests determine how well the |using|
|
dnl to resolve ambiguity. The next two tests determine how well the |using|
|
||||||
dnl keyword is supported.
|
dnl keyword is supported.
|
||||||
dnl
|
dnl
|
||||||
dnl Check to see if we can change access with |using|.
|
dnl Check to see if we can change access with |using|. Test both a
|
||||||
|
dnl legal and an illegal example.
|
||||||
AC_CACHE_CHECK(whether the C++ \"using\" keyword can change access,
|
AC_CACHE_CHECK(whether the C++ \"using\" keyword can change access,
|
||||||
ac_cv_cpp_access_changing_using,
|
ac_cv_cpp_access_changing_using2,
|
||||||
[AC_TRY_COMPILE(class X { public: int go(const X&) {return 3;} };
|
[AC_TRY_COMPILE(
|
||||||
class Y : public X {
|
class A { protected: int foo() { return 0; } };
|
||||||
public: int go(int) {return 2;}
|
class B : public A { public: using A::foo; };,
|
||||||
private: using X::go;
|
B b; return b.foo();,
|
||||||
};,
|
[AC_TRY_COMPILE(
|
||||||
X x; Y y;,
|
class A { public: int foo() { return 1; } };
|
||||||
ac_cv_cpp_access_changing_using=yes,
|
class B : public A { private: using A::foo; };,
|
||||||
ac_cv_cpp_access_changing_using=no)])
|
B b; return b.foo();,
|
||||||
if test "$ac_cv_cpp_access_changing_using" = yes ; then
|
ac_cv_cpp_access_changing_using2=no,
|
||||||
|
ac_cv_cpp_access_changing_using2=yes)],
|
||||||
|
ac_cv_cpp_access_changing_using2=no)])
|
||||||
|
if test "$ac_cv_cpp_access_changing_using2" = yes ; then
|
||||||
AC_DEFINE(HAVE_CPP_ACCESS_CHANGING_USING)
|
AC_DEFINE(HAVE_CPP_ACCESS_CHANGING_USING)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче