Consider something like this:
class A;
std::function<A(A)> f;
This is clearly something you want to do in your program. Any major compiler accepts that without problems.
My question is: is it technically allowed by the standard?
If I see correctly, the section
20.5.4.8 Other functions
prohibits use of template parameters of incomplete type at instantiation, unless otherwise specified (and not only for containers).
In the section about std::function
or <functional>
I see no reference to allowing this.
Does somebody know where and if this is explicitly written in the standard?