Standard Library Containers with additional optional template parameters?

c++, parameters, standards, stl, templates

Solution

I found the following issue report, which says

There is no ambiguity; the standard is clear as written. Library implementors are not permitted to add template parameters to standard library classes. This does not fall under the "as if" rule, so it would be permitted only if the standard gave explicit license for implementors to do this. This would require a change in the standard.

The LWG decided against making this change, because it would break user code involving template template parameters or specializations of standard library class templates.

The books and people that say an implementation may add other optional parameters seem to be wrong.

Problem

Having read the claim multiple times in articles - I want to add this question to Stackoverflow, and ask the community - is the following code portable? ``` template<template<typename T, typename Alloc> class C> void f() { /* some code goes here ... */ } int main() { f<std::vector>(); } ``` Is the implementation that supplies `std::vector` really allowed to have additional, defaulted template parameters beyond the two well known ones? This would render the above code ill-formed, as it assumes two template parameters. See the last paragraph in this article for an example of such a claim.

Original source