cameron314 / readerwriterqueue

A fast single-producer, single-consumer lock-free queue for C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interference with Qt's slots macro

ddevienne opened this issue · comments

commented

Renaming slots into slots_ fixes the issue. Easier than trying to #undef things.

It's Qt's fault of course, but still, would be nice to avoid that particular symbol in the code.
It's the first time I'm using that header in a header of mine, exposing it to more TUs and code,
including this one also using Qt headers.

For now, I'll maintain a local patch, but I'd appreciate if a rename of that symbol could go in the next release.

Thanks, --DD

1>------ Build started: Project: tests_..._exe, Configuration: Debug x64 ------
1>SpaceCmdsTests.cpp
1>D:\...\moodycamel/spsc/readerwritercircularbuffer.h(280,1): error C2208: 'std::unique_ptr<moodycamel::spsc_sema::LightweightSemaphore,std::default_delete<moodycamel::spsc_sema::LightweightSemaphore>>': no members defined using this type
1>D:\...\moodycamel/spsc/readerwritercircularbuffer.h(286): message : see reference to class template instantiation 'moodycamel::BlockingReaderWriterCircularBuffer<T>' being compiled
1>Done building project "tests_..._exe.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Oops. Silly Qt. I've (grudgingly) made the change :-)