Boost logo

Boost Users :

Subject: Re: [Boost-users] any_range vs. “canonical form” - what is the latter?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-04-09 11:36:31


On 04/08/2011 11:46 PM, John Funnell wrote:
> Boost's any_range documentation says the following:
> "Despite the underlying any_iterator being the fastest available
> implementation, the performance overhead of any_range is still
> appreciable due to the cost of virtual function calls required to
> implement increment, decrement, advance, equal etc. Frequently a
> better design choice is to convert to a canonical form."
> What does the author mean by a "canonical form"? Can someone give an example?

For example, copying the range into a vector.

In Christ,
Steven Watanabe

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at