Article ID: 249045
This article has been archived. It is offered "as is" and will no longer be updated.
The compiler generates an error such as the following when a pointer-to-member is used as a class template parameter.
error C2964: invalid expression as template parameter
This C++ language feature has not yet been implemented in Visual C++.
To not use the pointer-to-member as a template argument, pass it as a parameter to the class constructor.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Use the following sample code to reproduce the behavior: