Closed ptsneves closed 9 years ago
Ahh! That's... not good. It thinks my Block::is_empty()
is std::is_empty
. I'll have to think about how I can force the correct interpretation... this doesn't happen with g++ 4.8.1. I'd rather not resort to the linked commit's workaround (which duplicates the function definition) since I have quite a bit of repetitive code already.
Thanks for opening this issue!
You wouldn't happen to have a using namespace std;
somewhere before the #include
, would you? (It still shouldn't generate an error, mind, but it would at least make slightly more sense.)
I've reduced the problem to this test case: http://stackoverflow.com/q/27930448/21475 Very weird.
Sorry for the long delay, but I had some interruptions and I had to clean out my code of using namespace std;
which I didn't even know was in a header I was including.
Your tip, was right. When I removed the using namespace std;
no compile errors appeared. Thank you for avoiding a patch into a code I didn't really understand nor wanted to :D
Great, I'm glad you're no longer blocked by this. It's looking more and more like a bug with g++. Fortunately, there's a simple workaround, which I'll try to commit soon.
But with your code I was using namespace moodycamel
in a cpp.
That should be fine. Even combined with using namespace std
, there shouldn't be clashes between names (unless the standard someday adds a class called ConcurrentQueue
). It's either the compiler or my code (I don't think so, but we'll see) that's the problem.
It's looking less like a bug in g++ (EDG generates an error too, but not Clang or VS), but definitely weird nonetheless. I've committed a fix.
I have had this issue just including your header and compiling with GCC 4.9.1. My error log comes out like this:
Funny enough somebody has already tried to fix it just 3 days ago [gituhub]https://github.com/GATB/bcalm/commit/be7bda8a1553c994101ecb3f17a7d28807b9edcc so you might have a look at it.
Thanks for your work.