Boost logo

Boost Users :

Subject: Re: [Boost-users] Please help with metaprogramming question : termination of recursion
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-07-08 20:50:13


> You need to decide what function to call based on the _type_ of the
> fusion iterators:
> process_append(collection, begin, end, is_same<FusB, FusE>());

There is no guarantee that the types will be the same _only_ when it is the end. I'm pretty sure that's the case on a straightforward implementation of 'cons', but what if the iterators are the same type when the dereferenced element is the same type? At the very least, guarantee a unique type for what 'end' is.

Now if 'end' is a specific ending type, then I would hope to not need a metafunction to figure it out, but could use some "cons end-of-iteration type" easily obtainable from the cons, as an argument type of 'begin' in an overloaded form of the function. That is, tag "end" types with a base class for that purpose!

Thanks for the fast reply! I thought I'd have to come back to it tomorrow.

--John





TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


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