James Hirschorn wrote:
Cromwell Enage wrote
Hello, James.
In order to enable argument deduction, you need to augment your parameter declaration clause with either an explicit type or a Unary Metafunction Class--essentially an MPL Lambda Expression--that returns mpl::true_ when the argument type fulfills the requirements you want to impose on it. Try one the following macro invocations: ...
Have you tried to compile your examples? They both fail for me, with the exact same error as the original. Also, I have read the documentation many times, and did not notice the requirement you mentioned.
I agree with Cromwell, to have a hope of working, you'd have to some way of identifying the expected type of the argument to have a hope of deducing it. However, I haven't found a syntax that works here either -- my suspicion is that deduced constructor parameters aren't currently supported. Certainly there aren't any tests which validate such functionality, and no documentation regarding it either. Unfortunately, a cursory glance through the code wasn't very illuminating -- it would take me some serious study to really understand the code. Hopefully I'm wrong and a maintainer will be able to set us straight. Sorry, Nate