Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/test/detail/workaround.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 // (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 <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 | |
28 namespace boost { | |
29 | |
30 namespace unit_test { | |
31 | |
32 namespace ut_detail { | |
33 | |
34 #ifdef BOOST_NO_STD_DISTANCE | |
35 template <class T> | |
36 std::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 | |
48 using std::distance; | |
49 #endif | |
50 | |
51 template <class T> inline void ignore_unused_variable_warning(const T&) {} | |
52 | |
53 } // namespace ut_detail | |
54 | |
55 } // namespace unit_test | |
56 | |
57 namespace unit_test_framework = unit_test; | |
58 | |
59 } // namespace boost | |
60 | |
61 //____________________________________________________________________________// | |
62 | |
63 #include <boost/test/detail/enable_warnings.hpp> | |
64 | |
65 #endif // BOOST_TEST_WORKAROUND_HPP_021005GER |