Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.


//  (C) Copyright Gennadiy Rozental 2005-2014.
//  Distributed under the Boost Software License, Version 1.0.
//  (See accompanying file LICENSE_1_0.txt or copy at

//  See for the library home page.
//!@brief contains mics. workarounds
// ***************************************************************************


// Boost
#include <boost/config.hpp> // compilers workarounds and std::ptrdiff_t

// STL
#include <iterator>     // for std::distance

#include <boost/test/detail/suppress_warnings.hpp>


namespace boost {
namespace unit_test {
namespace ut_detail {

template <class T>
std::ptrdiff_t distance( T const& x_, T const& y_ )
    std::ptrdiff_t res = 0;

    std::distance( x_, y_, res );

    return res;


using std::distance;

template <class T> inline void ignore_unused_variable_warning(const T&) {}

} // namespace ut_detail
} // namespace unit_test
} // namespace boost


#include <boost/test/detail/enable_warnings.hpp>