
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Gevorg Voskanyan Sent: Tuesday, April 20, 2010 1:23 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] puzzle with enable_if
"Only invalid types and expressions in the immediate context of the function type and its template parameter types can result in a deduction failure. [ Note: The evaluation of the substituted types and
OK, so "refactoring" in general won't work. The SFINAE must be directly caused by the template specialization mentioned in the function declaration. Your case f (struct A contains T::value_type) is a failure of A to specialize. My example where the function returned something derived from A, say struct A2 : A { ..., is not a failure of A2 but of a type needed by it. T::value_type is still a dependant type, I would have thought, but I see that the error is the use of T:: that is a part of A's syntax. The difference is a nested call to have a template instantiated. Is that the right track? Thanks, --John (footer woes...) 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.