Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are migrating our projects from vs2005 to VS2015 .In one of the project we are using below template declaration
template <class __declspec(dllexport) WindowClass>


In 2005,it is building successfully but in vs2015 getting below error.
'WindowClass': illegal type for non-type template parameter 'WindowClass'


I am not sure about the use of dllexport inside a template . Anyone know why it is useful and why it is not working in vs2015?

What I have tried:

When I search with the above error, I see that in that latest c++ version we cannot declare a template with a structure or union argument . Apart from this I dont find any information related to that dll export with a template
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900