Suppress a warning that's in the windows mobile system headers.

[SVN r57963]
This commit is contained in:
Daniel James
2009-11-26 23:15:30 +00:00
parent b647aba2cd
commit 4c4ba633c3
16 changed files with 63 additions and 19 deletions

View File

@@ -12,3 +12,9 @@
# define TEST_EXTENSIONS # define TEST_EXTENSIONS
# endif # endif
#endif #endif
#if defined(_WIN32_WCE)
// The standard windows mobile headers trigger this warning so I disable it
// before doing anything else.
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
#endif

View File

@@ -3,6 +3,8 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#include <boost/functional/detail/container_fwd.hpp> #include <boost/functional/detail/container_fwd.hpp>
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)

View File

@@ -8,6 +8,8 @@
// It probably should be in boost/functional/hash/detail, but since it isn't it // It probably should be in boost/functional/hash/detail, but since it isn't it
// should work. // should work.
#include "./config.hpp"
#include <boost/functional/hash/extensions.hpp> #include <boost/functional/hash/extensions.hpp>
int main() { int main() {

View File

@@ -3,6 +3,7 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#include <boost/config.hpp> #include <boost/config.hpp>
#include <cstddef> #include <cstddef>

View File

@@ -3,6 +3,8 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#include <boost/config.hpp> #include <boost/config.hpp>
#include <cstddef> #include <cstddef>

View File

@@ -5,6 +5,8 @@
// This checks that template code implemented using hash_fwd will work. // This checks that template code implemented using hash_fwd will work.
#include "./config.hpp"
#include "./hash_fwd_test.hpp" #include "./hash_fwd_test.hpp"
#include <boost/detail/lightweight_test.hpp> #include <boost/detail/lightweight_test.hpp>

View File

@@ -6,6 +6,8 @@
// This test just makes sure a header which uses hash_fwd can compile without // This test just makes sure a header which uses hash_fwd can compile without
// the main hash headers. // the main hash headers.
#include "./config.hpp"
#if !defined(TEST_EXTENSIONS) || defined(TEST_STD_INCLUDES) #if !defined(TEST_EXTENSIONS) || defined(TEST_STD_INCLUDES)
int main() {} int main() {}

View File

@@ -6,6 +6,8 @@
// This test demonstrates an ADL bug in Borland 5.5 where ADL isn't performed // This test demonstrates an ADL bug in Borland 5.5 where ADL isn't performed
// in the global namespace. // in the global namespace.
#include "./config.hpp"
#include <boost/config.hpp> #include <boost/config.hpp>
#include <cstddef> #include <cstddef>

View File

@@ -3,14 +3,19 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define HASH_NAMESPACE boost #include "./config.hpp"
// Simple test to make sure BOOST_HASH_NO_EXTENSIONS does disable extensions // Simple test to make sure BOOST_HASH_NO_EXTENSIONS does disable extensions
// (or at least one of them). // (or at least one of them).
#if !defined(BOOST_HASH_NO_EXTENSIONS)
# define BOOST_HASH_NO_EXTENSIONS # define BOOST_HASH_NO_EXTENSIONS
#endif
#ifdef TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp> # include <boost/functional/hash.hpp>
#include <boost/functional/hash.hpp> #endif
template <class T> void ignore(T const&) {} template <class T> void ignore(T const&) {}
@@ -18,5 +23,6 @@ int main()
{ {
HASH_NAMESPACE::hash< int[10] > hasher; HASH_NAMESPACE::hash< int[10] > hasher;
ignore(hasher); ignore(hasher);
return 0; return 0;
} }

View File

@@ -3,7 +3,9 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define HASH_NAMESPACE boost #include "./config.hpp"
#if defined(TEST_EXTENSIONS)
// Include header without BOOST_HASH_NO_EXTENSIONS defined // Include header without BOOST_HASH_NO_EXTENSIONS defined
# if defined(BOOST_HASH_NO_EXTENSIONS) # if defined(BOOST_HASH_NO_EXTENSIONS)
@@ -14,13 +16,14 @@
// Include header with BOOST_HASH_NO_EXTENSIONS defined // Include header with BOOST_HASH_NO_EXTENSIONS defined
# define BOOST_HASH_NO_EXTENSIONS # define BOOST_HASH_NO_EXTENSIONS
# include <boost/functional/hash.hpp> # include <boost/functional/hash.hpp>
#endif
#include <boost/detail/lightweight_test.hpp> #include <boost/detail/lightweight_test.hpp>
#include <deque> #include <deque>
#include <cassert>
int main() int main()
{ {
#if defined(TEST_EXTENSIONS)
std::deque<int> x; std::deque<int> x;
x.push_back(1); x.push_back(1);
@@ -28,6 +31,7 @@ int main()
HASH_NAMESPACE::hash<std::deque<int> > hasher; HASH_NAMESPACE::hash<std::deque<int> > hasher;
BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x)); BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x));
#endif
return boost::report_errors(); return boost::report_errors();
} }

View File

@@ -3,7 +3,9 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define HASH_NAMESPACE boost #include "./config.hpp"
#if defined(TEST_EXTENSIONS)
// Include header with BOOST_HASH_NO_EXTENSIONS defined // Include header with BOOST_HASH_NO_EXTENSIONS defined
# if !defined(BOOST_HASH_NO_EXTENSIONS) # if !defined(BOOST_HASH_NO_EXTENSIONS)
@@ -14,12 +16,14 @@
// Include header without BOOST_HASH_NO_EXTENSIONS defined // Include header without BOOST_HASH_NO_EXTENSIONS defined
# undef BOOST_HASH_NO_EXTENSIONS # undef BOOST_HASH_NO_EXTENSIONS
# include <boost/functional/hash.hpp> # include <boost/functional/hash.hpp>
#endif
#include <boost/detail/lightweight_test.hpp> #include <boost/detail/lightweight_test.hpp>
#include <map> #include <map>
int main() int main()
{ {
#if defined(TEST_EXTENSIONS)
std::map<int, int> x; std::map<int, int> x;
x.insert(std::map<int, int>::value_type(53, -42)); x.insert(std::map<int, int>::value_type(53, -42));
@@ -27,6 +31,7 @@ int main()
HASH_NAMESPACE::hash<std::map<int, int> > hasher; HASH_NAMESPACE::hash<std::map<int, int> > hasher;
BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x)); BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x));
#endif
return boost::report_errors(); return boost::report_errors();
} }

View File

@@ -3,6 +3,8 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#define HASH_NAMESPACE boost #define HASH_NAMESPACE boost
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/detail/lightweight_test.hpp>

View File

@@ -3,6 +3,8 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#define HASH_NAMESPACE boost #define HASH_NAMESPACE boost
#define BOOST_HASH_NO_EXTENSIONS #define BOOST_HASH_NO_EXTENSIONS
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>

View File

@@ -3,6 +3,8 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>
extern int f(); extern int f();

View File

@@ -3,6 +3,8 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "./config.hpp"
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>
int f() { return 0; } int f() { return 0; }

View File

@@ -6,6 +6,8 @@
// Check that I haven't inadvertantly pulled namespace std into the global // Check that I haven't inadvertantly pulled namespace std into the global
// namespace. // namespace.
#include "./config.hpp"
#include <list> #include <list>
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>