From a330151f3288b01d1952290cb0c5d81d1ed04e99 Mon Sep 17 00:00:00 2001 From: Peder Holt Date: Tue, 11 Jan 2005 21:30:34 +0000 Subject: [PATCH] Disable odr tests for VC7. This compiler does not handle template types in expressions (at least not inside BOOST_TYPEOF) [SVN r2442] --- test/vintage/odr.hpp | 4 ++++ test/vintage/odr1.cpp | 2 ++ test/vintage/odr2.cpp | 2 ++ 3 files changed, 8 insertions(+) diff --git a/test/vintage/odr.hpp b/test/vintage/odr.hpp index 6e163dc..030b48f 100644 --- a/test/vintage/odr.hpp +++ b/test/vintage/odr.hpp @@ -10,12 +10,15 @@ void odr_test1(); void odr_test2(); +#if! BOOST_WORKAROUND(BOOST_MSVC,==1300) + // trying to cause ODR violation in a class template template class sum_t { public: +// VC7 fails using template types in typeof expression. typedef BOOST_TYPEOF_TPL(T() + U()) result_type; sum_t(const T& t, const U& u); @@ -50,5 +53,6 @@ typename sum_t::result_type sum(const T& t, const U& u) BOOST_AUTO_TPL(result, t + u); return result; } +#endif #endif//ODR_HPP_INCLUDED diff --git a/test/vintage/odr1.cpp b/test/vintage/odr1.cpp index 82eece3..e4b030d 100644 --- a/test/vintage/odr1.cpp +++ b/test/vintage/odr1.cpp @@ -9,10 +9,12 @@ using namespace std; void odr_test1() { +#if! BOOST_WORKAROUND(BOOST_MSVC,==1300) char i = 5; double d = 3.14; cout << sum(d, i) << endl; cout << sum(i, d) << endl; cout << make_sum(d, i)() << endl; cout << make_sum(i, d)() << endl; +#endif } diff --git a/test/vintage/odr2.cpp b/test/vintage/odr2.cpp index 31b4bdd..783a157 100644 --- a/test/vintage/odr2.cpp +++ b/test/vintage/odr2.cpp @@ -9,10 +9,12 @@ using namespace std; void odr_test2() { +#if! BOOST_WORKAROUND(BOOST_MSVC,==1300) char i = 5; double d = 3.14; cout << sum(d, i) << endl; cout << sum(i, d) << endl; cout << make_sum(d, i)() << endl; cout << make_sum(i, d)() << endl; +#endif }