blob: 654972b4d300201db806f572d43fb110ba953a40 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// (C) Copyright Gennadiy Rozental 2005-2008.
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$
9//
10// Version : $Revision: 54633 $
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 <ndnboost/config.hpp> // compilers workarounds and std::ptrdiff_t
20
21// STL
22#include <iterator> // for std::distance
23
24#include <ndnboost/test/detail/suppress_warnings.hpp>
25
26//____________________________________________________________________________//
27
28namespace ndnboost {
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
45//____________________________________________________________________________//
46
47#else
48using std::distance;
49#endif
50
51template <class T> inline void ignore_unused_variable_warning(const T&) {}
52
53} // namespace ut_detail
54
55} // namespace unit_test
56
57namespace unit_test_framework = unit_test;
58
59} // namespace ndnboost
60
61//____________________________________________________________________________//
62
63#include <ndnboost/test/detail/enable_warnings.hpp>
64
65#endif // BOOST_TEST_WORKAROUND_HPP_021005GER