ock">
BOOST_PARAMETER_NAME(name)
BOOST_PARAMETER_NAME(index)

template &lt;class Name, class Index&gt;
int deduce_arg_types_impl(Name&amp; name, Index&amp; index)
{
    Name&amp; n2 = name;  // we know the types
    Index&amp; i2 = index;
    return index;
}

template &lt;class ArgumentPack&gt;
int deduce_arg_types(ArgumentPack const&amp; args)
{
    return deduce_arg_types_impl(args[_name], args[_index|42]);
}
</pre>
<!-- @example.prepend('''
#include <boost/parameter.hpp>
#include <cassert>''') -->
<!-- @