|
Boost : |
Subject: Re: [boost] [parameter] Preventing instantiation of lazy binding operator() until default is needed
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-05-29 18:27:05
On Fri, 29 May 2009, Steven Watanabe wrote:
> In this case, there's nothing Boost.Parameter can do about it, since result
> type is instantiated when you
> construct bogus<const char*>(). There is no way to make operator() a
> template without having
> variadic templates or by making Boost.Parameter pass an argument to
> operator().
I understand that. Is there some way to get a parameter passed to
operator()? I think that would add an extra layer of template
instantiation to allow the result type of operator() to be invalid. Could
there be some special member type that Boost.Parameter looks for to decide
whether to call def() or def(0)? That would keep compatibility while
allowing more unusual cases like mine to work.
-- Jeremiah Willcock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk