source: NonGTP/Boost/boost/test/detail/workaround.hpp @ 857

Revision 857, 2.0 KB checked in by igarcia, 19 years ago (diff)
Line 
1//  (C) Copyright Gennadiy Rozental 2005.
2//  Distributed under the Boost Software License, Version 1.0.
3//  (See accompanying file LICENSE_1_0.txt or copy at
4//  http://www.boost.org/LICENSE_1_0.txt)
5
6//  See http://www.boost.org/libs/test for the library home page.
7//
8//  File        : $RCSfile: workaround.hpp,v $
9//
10//  Version     : $Revision: 1.2 $
11//
12//  Description : contains mics. workarounds
13// ***************************************************************************
14
15#ifndef BOOST_TEST_WORKAROUND_HPP_021005GER
16#define BOOST_TEST_WORKAROUND_HPP_021005GER
17
18// Boost
19#include <boost/config.hpp> // compilers workarounds and std::ptrdiff_t
20
21// STL
22#include <iterator>     // for std::distance
23
24#include <boost/test/detail/suppress_warnings.hpp>
25
26//____________________________________________________________________________//
27
28namespace boost {
29
30namespace unit_test {
31
32namespace ut_detail {
33
34#ifdef BOOST_NO_STD_DISTANCE
35template <class T>
36std::ptrdiff_t distance( T const& x_, T const& y_ )
37{
38    std::ptrdiff_t res = 0;
39
40    std::distance( x_, y_, res );
41
42    return res;
43}
44#else
45using std::distance;
46#endif
47
48template <class T> inline void ignore_unused_variable_warning(const T&) {}
49
50} // namespace ut_detail
51
52} // namespace unit_test
53
54namespace unit_test_framework = unit_test;
55
56} // namespace boost
57
58//____________________________________________________________________________//
59
60#include <boost/test/detail/enable_warnings.hpp>
61
62// ***************************************************************************
63//  Revision History :
64// 
65//  $Log: workaround.hpp,v $
66//  Revision 1.2  2005/02/21 10:20:04  rogeeff
67//  ignore unused vars helper
68//
69//  Revision 1.1  2005/02/20 08:27:06  rogeeff
70//  This a major update for Boost.Test framework. See release docs for complete list of fixes/updates
71//
72// ***************************************************************************
73
74#endif // BOOST_TEST_WORKAROUND_HPP_021005GER
Note: See TracBrowser for help on using the repository browser.