[boost-users] [iterator_range construct new iterator_range of arbitary size_type]
Hi I have two questions. How would I go about using iterator_range to construct a new boost iterator_range of specific size_type ? 1.) Like std::vector<int> v(40); // constructs 40 int objects but instead your giving only std::vector<int>::iterator beg(v.begin()), end(v.end()); // the range 2.) How would with combination of iterator_range modify an existing sequence. Like BOOST_FOREACH(int& x, v) but using boost iterator_range concept instead. Thanks.
chun ping wang wrote:
Hi I have two questions. How would I go about using iterator_range to construct a new boost iterator_range of specific size_type ? 1.) Like std::vector<int> v(40); // constructs 40 int objects but instead your giving only
std::vector<int>::iterator beg(v.begin()), end(v.end()); // the range
2.) How would with combination of iterator_range modify an existing sequence.
Like BOOST_FOREACH(int& x, v) but using boost iterator_range concept instead.
What do you mean "specific size_type"? Could you show some example? Regards, -- Shunsuke Sogame
i meant construct iterator range of x number of types.
Like construct 40 integer objects or 20 integer objects.. like that.
On Dec 25, 2007 7:12 AM, shunsuke
chun ping wang wrote:
Hi I have two questions. How would I go about using iterator_range to construct a new boost iterator_range of specific size_type ? 1.) Like std::vector<int> v(40); // constructs 40 int objects but instead your giving only
std::vector<int>::iterator beg(v.begin()), end(v.end()); // the range
2.) How would with combination of iterator_range modify an existing sequence.
Like BOOST_FOREACH(int& x, v) but using boost iterator_range concept instead.
What do you mean "specific size_type"? Could you show some example?
Regards,
-- Shunsuke Sogame
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
chun ping wang wrote:
i meant construct iterator range of x number of types. Like construct 40 integer objects or 20 integer objects.. like that.
AFIAK, Boost.Range doesn't offer the way to allocate memory yet. boost::shared_container_iterator might be ported to Boost.Range. Regards, -- Shunsuke Sogame
AFIAK, Boost.Range doesn't offer the way to allocate memory yet.
I haven't used boost beyond calling some regex methods but I was curious, in light of performance questions and complaints, if boost has any cache or architetcture aware stuff, like allocators? I have written some of my own one-of classes to allocate blocks of memory for special applications ( the proverbial hard-coded code ) but was curious to know if there are better solutions. IIRC from the google hits, FFTW seems to be very memory aware but I have never looked at details there either. Thanks. Mike Marchywka 586 Saint James Walk Marietta GA 30067-7165 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency only marchywka@hotmail.com Note: Hotmail is blocking my mom's entire ISP claiming it is to reduce spam but probably to force users to use hotmail. Please DON'T assume I am ignoring you and try me on marchywka@yahoo.com if no reply here. Thanks.
To: boost-users@lists.boost.org From: pstade.mb@gmail.com Date: Wed, 26 Dec 2007 01:03:33 +0900 Subject: Re: [Boost-users] [boost-users] [iterator_range construct new iterator_range of arbitary size_type]
chun ping wang wrote:
i meant construct iterator range of x number of types. Like construct 40 integer objects or 20 integer objects.. like that.
AFIAK, Boost.Range doesn't offer the way to allocate memory yet. boost::shared_container_iterator might be ported to Boost.Range.
Regards,
-- Shunsuke Sogame
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_________________________________________________________________ Get the power of Windows + Web with the new Windows Live. http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007
participants (3)
-
chun ping wang
-
Mike Marchywka
-
shunsuke