Merge branch 'stl-fixes'
Minor fixes to STL build. See https://github.com/wxWidgets/wxWidgets/pull/2289
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -123,7 +123,7 @@ jobs:
|
||||
case "${{ matrix.compiler }}" in
|
||||
clang)
|
||||
echo CC=clang >> $GITHUB_ENV
|
||||
echo CXX=clang++ >> $GITHUB_ENV
|
||||
echo CXX='clang++ -stdlib=libc++' >> $GITHUB_ENV
|
||||
echo LD=clang++ >> $GITHUB_ENV
|
||||
|
||||
allow_warn_opt="-Wno-error=#warnings"
|
||||
|
@@ -132,21 +132,6 @@ if(NOT MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
|
||||
wx_check_cxx_source_compiles("
|
||||
std::vector<int> moo;
|
||||
std::list<int> foo;
|
||||
std::vector<int>::iterator it =
|
||||
std::find_if(moo.begin(), moo.end(),
|
||||
std::bind2nd(std::less<int>(), 3));"
|
||||
wxTEST_STL
|
||||
string functional algorithm vector list
|
||||
)
|
||||
if(NOT wxTEST_STL)
|
||||
message(FATAL_ERROR "Can't use wxUSE_STL as basic STL functionality is missing")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
std::string foo, bar;
|
||||
foo.compare(bar);
|
||||
|
40
configure
vendored
40
configure
vendored
@@ -20706,46 +20706,6 @@ $as_echo "$as_me: WARNING: No std::iostreams, switching to --disable-std_iostrea
|
||||
fi
|
||||
|
||||
if test "$wxUSE_STL" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for basic STL functionality" >&5
|
||||
$as_echo_n "checking for basic STL functionality... " >&6; }
|
||||
if ${wx_cv_lib_stl+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
std::vector<int> moo;
|
||||
std::list<int> foo;
|
||||
std::vector<int>::iterator it =
|
||||
std::find_if(moo.begin(), moo.end(),
|
||||
std::bind2nd(std::less<int>(), 3));
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
wx_cv_lib_stl=yes
|
||||
else
|
||||
wx_cv_lib_stl=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_lib_stl" >&5
|
||||
$as_echo "$wx_cv_lib_stl" >&6; }
|
||||
|
||||
if test "$wx_cv_lib_stl" != yes; then
|
||||
as_fn_error $? "Can't use --enable-stl as basic STL functionality is missing" "$LINENO" 5
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compliant std::string::compare" >&5
|
||||
$as_echo_n "checking for compliant std::string::compare... " >&6; }
|
||||
if ${wx_cv_func_stdstring_compare+:} false; then :
|
||||
|
22
configure.in
22
configure.in
@@ -2002,28 +2002,6 @@ if test "$wxUSE_STD_IOSTREAM" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$wxUSE_STL" = "yes"; then
|
||||
dnl check for basic STL functionality
|
||||
AC_CACHE_CHECK([for basic STL functionality],
|
||||
wx_cv_lib_stl,
|
||||
[AC_TRY_COMPILE([#include <string>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <list>],
|
||||
[std::vector<int> moo;
|
||||
std::list<int> foo;
|
||||
std::vector<int>::iterator it =
|
||||
std::find_if(moo.begin(), moo.end(),
|
||||
std::bind2nd(std::less<int>(), 3));],
|
||||
wx_cv_lib_stl=yes,
|
||||
wx_cv_lib_stl=no
|
||||
)]
|
||||
)
|
||||
|
||||
if test "$wx_cv_lib_stl" != yes; then
|
||||
AC_MSG_ERROR([Can't use --enable-stl as basic STL functionality is missing])
|
||||
fi
|
||||
|
||||
dnl check for compliant std::string::compare
|
||||
AC_CACHE_CHECK([for compliant std::string::compare],
|
||||
wx_cv_func_stdstring_compare,
|
||||
|
@@ -507,8 +507,6 @@ public:
|
||||
size_t operator()( wxLongLong_t x ) const wxNOEXCEPT { return longlongHash(x); }
|
||||
size_t operator()( wxULongLong_t x ) const wxNOEXCEPT { return longlongHash(x); }
|
||||
#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
|
||||
|
||||
wxIntegerHash& operator=(const wxIntegerHash&) { return *this; }
|
||||
};
|
||||
|
||||
#else // wxNEEDS_WX_HASH_MAP
|
||||
|
Reference in New Issue
Block a user