mirror of
https://github.com/boostorg/algorithm.git
synced 2025-07-29 12:07:18 +02:00
Added BOOST_EXPLICIT_TEMPLATE_TYPE(Value) to fix MSVC (thanks to Joaquin
Munoz) [SVN r23998]
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
#include <boost/config.hpp> /* prevents some nasty warns in MSVC */
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -8,6 +7,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#include <boost/config.hpp> /* prevents some nasty warns in MSVC */
|
||||||
#include <boost/algorithm/minmax_element.hpp>
|
#include <boost/algorithm/minmax_element.hpp>
|
||||||
#include <boost/test/included/test_exec_monitor.hpp>
|
#include <boost/test/included/test_exec_monitor.hpp>
|
||||||
#include <boost/iterator/reverse_iterator.hpp>
|
#include <boost/iterator/reverse_iterator.hpp>
|
||||||
@ -174,7 +174,9 @@ void test_minmax(CIterator first, CIterator last, int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class Container, class Iterator, class Value>
|
template <class Container, class Iterator, class Value>
|
||||||
void test_container(Iterator first, Iterator last, int n, Container* dummy = 0 )
|
void test_container(Iterator first, Iterator last, int n,
|
||||||
|
Container* dummy = 0
|
||||||
|
BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Value) )
|
||||||
{
|
{
|
||||||
Container c(first, last);
|
Container c(first, last);
|
||||||
test_minmax(c.begin(), c.end(), n);
|
test_minmax(c.begin(), c.end(), n);
|
||||||
@ -191,7 +193,7 @@ void test_range(Iterator first, Iterator last, int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class Value>
|
template <class Value>
|
||||||
void test(int n)
|
void test(int n BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Value))
|
||||||
{
|
{
|
||||||
// Populate test vector with identical values
|
// Populate test vector with identical values
|
||||||
std::vector<Value> test_vector(n, Value(1));
|
std::vector<Value> test_vector(n, Value(1));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
#include <boost/algorithm/minmax.hpp>
|
#include <boost/algorithm/minmax.hpp>
|
||||||
#include <boost/test/included/test_exec_monitor.hpp>
|
#include <boost/test/included/test_exec_monitor.hpp>
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class Value>
|
template <class Value>
|
||||||
void test()
|
void test(BOOST_EXPLICIT_TEMPLATE_TYPE(Value))
|
||||||
{
|
{
|
||||||
using namespace boost;
|
using namespace boost;
|
||||||
Value zero(0), one(1);
|
Value zero(0), one(1);
|
||||||
|
Reference in New Issue
Block a user