Using template argument as template argument type
===

I seem to be unable to use multiple layers of templates in the following manner,

    template <typename T>
    template <T value>
    void printValueAsInteger()
    {
        printf("value as integer is %i\n", (int) value);
    }

so that it could be called as:

    printValueAsInteger<123>();
It results in the following error message: `too many template-parameter-lists`.

It works if I use `template <typename T, T value>` with `printValueAsInteger<int, 123>()`, but that requires me to explicitly specify the type. How can I make it so that `printValueAsInteger<123>()` prints `value as integer is 123`?