
18 Feb
2009
18 Feb
'09
3:41 p.m.
Hansi wrote:
Daniel Hulme schrieb:
typedef array<int,100000000> dataarray;
void do_tests(dataarray& data) { { timer t; std::pair< std::vector<int>::iterator, std::vector<int>::iterator
result = boost::minmax_element(data.begin(), data.end());
This line should be std::pair< dataarray::iterator, dataarray::iterator > result = boost::minmax_element(data.begin(), data.end());
minmax_element might be clever, but it can't magically turn boost::array's iterators into std::vector's iterators.
really good point..thanks..it seems that the release compilation optimize this error away...strange...
Because in release vector's iterators are raw pointers, which by coincidence is the same as array::iterator.