Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-07-22 05:40:42


The following patches make the two tests of Boost.Minmax pass
for MSVC 6.5:

1. minmax.hpp:

28a29
> #include <boost/ref.hpp>

There were some usages of boost::ref without including its header. I
think
this patch is necessary for every copmiler, not only MSVC.

2. minmax_test.hpp:

52,53c52,53
< BOOST_CHECK_EQUAL( result1.get<0>(), zero );
< BOOST_CHECK_EQUAL( result1.get<1>(), one );

---
>   BOOST_CHECK_EQUAL( get<0>(result1), zero );
>   BOOST_CHECK_EQUAL( get<1>(result1), one );
56,57c56,57
<   BOOST_CHECK_EQUAL( result2.get<0>(), zero );
<   BOOST_CHECK_EQUAL( result2.get<1>(), one );
---
>   BOOST_CHECK_EQUAL( get<0>(result2), zero );
>   BOOST_CHECK_EQUAL( get<1>(result2), one );
62,63c62,63
<   BOOST_CHECK_EQUAL( result3.get<0>(), zero );
<   BOOST_CHECK_EQUAL( result3.get<1>(), one );
---
>   BOOST_CHECK_EQUAL( get<0>(result3), zero );
>   BOOST_CHECK_EQUAL( get<1>(result3), one );
68,69c68,69
<   BOOST_CHECK_EQUAL( result4.get<0>(), zero );
<   BOOST_CHECK_EQUAL( result4.get<1>(), one );
---
>   BOOST_CHECK_EQUAL( get<0>(result4), zero );
>   BOOST_CHECK_EQUAL( get<1>(result4), one );
In MSVC 6.0 and later Boost.Tuple does not provide the get<>() member
function, so we have to resort to the global get function. I don't think
this does any harm to any other compiler.
3. minmax_element_test.hpp
0a1
> #include <boost/config.hpp> /* prevents some nasty warns in MSVC */
35a37,38
>
> BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(custom)
The first include activates pragmas in MSVC that help avoid some
nasty and harmless warnings. As for the second change, the error
messages
clearly indicate that this macro be used. This is what I've done, and
the now test
compiles and runs like breeze.
With these three changes, all failures for MSVC 6.5 are solved.
OK to commit?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

28a29
> #include <boost/ref.hpp>

52,53c52,53
< BOOST_CHECK_EQUAL( result1.get<0>(), zero );
< BOOST_CHECK_EQUAL( result1.get<1>(), one );

---
>   BOOST_CHECK_EQUAL( get<0>(result1), zero );
>   BOOST_CHECK_EQUAL( get<1>(result1), one );
56,57c56,57
<   BOOST_CHECK_EQUAL( result2.get<0>(), zero );
<   BOOST_CHECK_EQUAL( result2.get<1>(), one );
---
>   BOOST_CHECK_EQUAL( get<0>(result2), zero );
>   BOOST_CHECK_EQUAL( get<1>(result2), one );
62,63c62,63
<   BOOST_CHECK_EQUAL( result3.get<0>(), zero );
<   BOOST_CHECK_EQUAL( result3.get<1>(), one );
---
>   BOOST_CHECK_EQUAL( get<0>(result3), zero );
>   BOOST_CHECK_EQUAL( get<1>(result3), one );
68,69c68,69
<   BOOST_CHECK_EQUAL( result4.get<0>(), zero );
<   BOOST_CHECK_EQUAL( result4.get<1>(), one );
---
>   BOOST_CHECK_EQUAL( get<0>(result4), zero );
>   BOOST_CHECK_EQUAL( get<1>(result4), one );

0a1
> #include <boost/config.hpp> /* prevents some nasty warns in MSVC */
35a37,38
>
> BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(custom)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk