|
Boost : |
Subject: Re: [boost] a (useful?) crtp trick
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2012-08-27 07:17:35
On 27.08.2012 12:49, pavel wrote:
> Sebastian wrote on Monday, August 27, 2012 at 12:28:16:
>> On 24.08.2012 19:50, pavel wrote:
>> I think this only happens to work by accident, because compilers tend to
>> defer instantiation of function templates until the end of the
>> translation unit, when a proper instantiation of Base is available. But
>> without a compiler that doesn't I don't think I can come up with code
>> that shows this.
> the thing is in the order of instantiation
>
>
> so any (modern) standard conforming compiler should do this (feel free
> to prove me wrong)
>
You're right, I forgot that f cannot possibly be instantiated before Base.
Sebastian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk