Boost logo

Boost Users :

Subject: [Boost-users] any_range vs. “canonical form” - what is the latter?
From: John Funnell (john.funnell_at_[hidden])
Date: 2011-04-09 02:46:44


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?

Many thanks

[question originally asked at http://stackoverflow.com/questions/5601303]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net