Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misuse of class template #79

Closed
OgreTransporter opened this issue Aug 9, 2016 · 3 comments
Closed

Misuse of class template #79

OgreTransporter opened this issue Aug 9, 2016 · 3 comments

Comments

@OgreTransporter
Copy link
Contributor

OgreTransporter commented Aug 9, 2016

The class WorkQueue is defined in WorkQueue.h:

template<class R>
class WorkQueue
{

But it is used with non-class data types:

libosmscout-import\include\osmscout\import\Preprocess.h(78): WorkQueue<void> writeWorkerQueue;
libosmscout-map\include\osmscout\MapService.h(118): mutable WorkQueue<bool> nodeWorkerQueue;
libosmscout-map\include\osmscout\MapService.h(121): mutable WorkQueue<bool> wayWorkerQueue;
libosmscout-map\include\osmscout\MapService.h(124): mutable WorkQueue<bool> wayLowZoomWorkerQueue;
libosmscout-map\include\osmscout\MapService.h(127): mutable WorkQueue<bool> areaWorkerQueue;
libosmscout-map\include\osmscout\MapService.h(130): mutable WorkQueue<bool> areaLowZoomWorkerQueue;

This can create issues with strict compiler settings.

@Framstag
Copy link
Owner

Framstag commented Aug 9, 2016

It it just about replacing "class" with "typename"?

@Framstag
Copy link
Owner

Framstag commented Aug 14, 2016

I have now exchanged class with typename. The "internet" though claims that both variant should be equal!?

Can I close the issue?

@Framstag
Copy link
Owner

Framstag commented Sep 4, 2016

I do not see any such warning (anymore) in the MSVC 2105 builds (msbuild/cmake) nor in the Linux builds. I close the issue.

@Framstag Framstag closed this as completed Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants