|
Boost : |
Subject: Re: [boost] [alogrithm] compile error with VS2008 in debug build (boost 1.38)
From: Herve Bronnimann (hervebronnimann_at_[hidden])
Date: 2009-02-18 11:08:53
I believe both iterators would be int* but a debut build might
strengthen vectors iterators with bounds checking and stuff so it no
longer is an int*. HB
Sent from my iPhone
On Feb 18, 2009, at 10:06 AM, Hansi <hansipet_at_[hidden]> 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...
>
> Thanks
> Hansjörg
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk