Remove feature test for HAVE_EXPLICIT
This commit is contained in:
47
acinclude.m4
47
acinclude.m4
@@ -208,53 +208,6 @@ AC_DEFUN([WX_CPP_NEW_HEADERS],
|
|||||||
AC_LANG_RESTORE
|
AC_LANG_RESTORE
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
|
||||||
dnl WX_CPP_EXPLICIT checks whether the C++ compiler support the explicit
|
|
||||||
dnl keyword and defines HAVE_EXPLICIT if this is the case
|
|
||||||
dnl ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
AC_DEFUN([WX_CPP_EXPLICIT],
|
|
||||||
[
|
|
||||||
AC_CACHE_CHECK([if C++ compiler supports the explicit keyword],
|
|
||||||
wx_cv_explicit,
|
|
||||||
[
|
|
||||||
AC_LANG_SAVE
|
|
||||||
AC_LANG_CPLUSPLUS
|
|
||||||
|
|
||||||
dnl do the test in 2 steps: first check that the compiler knows about the
|
|
||||||
dnl explicit keyword at all and then verify that it really honours it
|
|
||||||
AC_TRY_COMPILE(
|
|
||||||
[
|
|
||||||
class Foo { public: explicit Foo(int) {} };
|
|
||||||
],
|
|
||||||
[
|
|
||||||
return 0;
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_TRY_COMPILE(
|
|
||||||
[
|
|
||||||
class Foo { public: explicit Foo(int) {} };
|
|
||||||
static void TakeFoo(const Foo& foo) { }
|
|
||||||
],
|
|
||||||
[
|
|
||||||
TakeFoo(17);
|
|
||||||
return 0;
|
|
||||||
],
|
|
||||||
wx_cv_explicit=no,
|
|
||||||
wx_cv_explicit=yes
|
|
||||||
)
|
|
||||||
],
|
|
||||||
wx_cv_explicit=no
|
|
||||||
)
|
|
||||||
|
|
||||||
AC_LANG_RESTORE
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$wx_cv_explicit" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_EXPLICIT)
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl WX_CHECK_FUNCS(FUNCTIONS...,
|
dnl WX_CHECK_FUNCS(FUNCTIONS...,
|
||||||
dnl [ACTION-IF-FOUND],
|
dnl [ACTION-IF-FOUND],
|
||||||
|
80
configure
vendored
80
configure
vendored
@@ -18988,86 +18988,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C++ compiler supports the explicit keyword" >&5
|
|
||||||
$as_echo_n "checking if C++ compiler supports the explicit keyword... " >&6; }
|
|
||||||
if ${wx_cv_explicit+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
|
|
||||||
|
|
||||||
ac_ext=cpp
|
|
||||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
|
||||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
||||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
||||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|
||||||
|
|
||||||
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
class Foo { public: explicit Foo(int) {} };
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
||||||
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
class Foo { public: explicit Foo(int) {} };
|
|
||||||
static void TakeFoo(const Foo& foo) { }
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
TakeFoo(17);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
||||||
wx_cv_explicit=no
|
|
||||||
else
|
|
||||||
wx_cv_explicit=yes
|
|
||||||
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_cv_explicit=no
|
|
||||||
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
|
|
||||||
ac_ext=c
|
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
||||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
||||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_explicit" >&5
|
|
||||||
$as_echo "$wx_cv_explicit" >&6; }
|
|
||||||
|
|
||||||
if test "$wx_cv_explicit" = "yes"; then
|
|
||||||
$as_echo "#define HAVE_EXPLICIT 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
ac_ext=cpp
|
ac_ext=cpp
|
||||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
@@ -1802,9 +1802,6 @@ if test "$HAVE_CXX11" != "1" ; then
|
|||||||
dnl check for iostream (as opposed to iostream.h) standard header
|
dnl check for iostream (as opposed to iostream.h) standard header
|
||||||
WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
|
WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
|
||||||
|
|
||||||
dnl check whether C++ compiler supports explicit keyword
|
|
||||||
WX_CPP_EXPLICIT
|
|
||||||
|
|
||||||
dnl the next few tests are all for C++ features and so need to be done using
|
dnl the next few tests are all for C++ features and so need to be done using
|
||||||
dnl C++ compiler
|
dnl C++ compiler
|
||||||
AC_LANG_PUSH(C++)
|
AC_LANG_PUSH(C++)
|
||||||
|
@@ -258,7 +258,7 @@ typedef short int WXTYPE;
|
|||||||
#define wxOVERRIDE override
|
#define wxOVERRIDE override
|
||||||
#else /* !HAVE_OVERRIDE */
|
#else /* !HAVE_OVERRIDE */
|
||||||
#define wxOVERRIDE
|
#define wxOVERRIDE
|
||||||
#endif /* HAVE_OVERRIDE/!HAVE_EXPLICIT */
|
#endif /* HAVE_OVERRIDE */
|
||||||
|
|
||||||
/* wxFALLTHROUGH is used to notate explicit fallthroughs in switch statements */
|
/* wxFALLTHROUGH is used to notate explicit fallthroughs in switch statements */
|
||||||
|
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#define __DARWIN__ 1
|
#define __DARWIN__ 1
|
||||||
#define wx_USE_NANOX 0
|
#define wx_USE_NANOX 0
|
||||||
|
|
||||||
#define HAVE_EXPLICIT 1
|
|
||||||
#define HAVE_VA_COPY 1
|
#define HAVE_VA_COPY 1
|
||||||
#define HAVE_VARIADIC_MACROS 1
|
#define HAVE_VARIADIC_MACROS 1
|
||||||
#define HAVE_STD_WSTRING 1
|
#define HAVE_STD_WSTRING 1
|
||||||
|
@@ -712,11 +712,6 @@
|
|||||||
#define wxUSE_CRASHREPORT 0
|
#define wxUSE_CRASHREPORT 0
|
||||||
/* --- end MSW options --- */
|
/* --- end MSW options --- */
|
||||||
|
|
||||||
/*
|
|
||||||
* Define if your compiler supports the explicit keyword
|
|
||||||
*/
|
|
||||||
#undef HAVE_EXPLICIT
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define if your compiler has C99 va_copy
|
* Define if your compiler has C99 va_copy
|
||||||
*/
|
*/
|
||||||
|
@@ -781,11 +781,6 @@ typedef pid_t GPid;
|
|||||||
|
|
||||||
/* --- end MSW options --- */
|
/* --- end MSW options --- */
|
||||||
|
|
||||||
/*
|
|
||||||
* Define if your compiler supports the explicit keyword
|
|
||||||
*/
|
|
||||||
#define HAVE_EXPLICIT 1
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define if your compiler has C99 va_copy
|
* Define if your compiler has C99 va_copy
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user