On 11/12/2012 02:02 PM, bearophile wrote:
Like this?

Thanks for the thought, but not really :-( Your code _checks_ that the second argument has the correct type, but it doesn't perform an implicit conversion where that is possible.

In a pseudo-code-y sense, what I want to be able to do is something like:

    auto func(FooT)(FooT foo, FooT.T1 x)
    {
        ...
    }

and indeed I tried that on the off-chance that it'd work; but it fails to compile with an error message "Undefined identifier FooT.T1".

All of the messing around with a second template argument was just in order to be able to achieve something equivalent to the above.

Reply via email to