blob: d595ffb56e77ed7df4a261d3922a4d0a67a1ed89 [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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070015#ifndef NDNBOOST_TEST_WORKAROUND_HPP_021005GER
16#define NDNBOOST_TEST_WORKAROUND_HPP_021005GER
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070017
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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070034#ifdef NDNBOOST_NO_STD_DISTANCE
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070035template <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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070065#endif // NDNBOOST_TEST_WORKAROUND_HPP_021005GER