Skip to content

Won't compile in GCC 4.9.1 #8

@ptsneves

Description

@ptsneves

I have had this issue just including your header and compiling with GCC 4.9.1. My error log comes out like this:

concurrentqueue/concurrentqueue.h: In destructor ‘moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::~ExplicitProducer()’:
concurrentqueue/concurrentqueue.h:1538:51: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::is_empty’
  if (block->template is_empty<explicit_context>()) {
                                               ^
concurrentqueue/concurrentqueue.h:1538:51: error:   expected a type, got ‘explicit_context’
concurrentqueue/concurrentqueue.h: In member function ‘bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue(U&&)’:
concurrentqueue/concurrentqueue.h:1586:96: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::is_empty’
 if (this->tailBlock != nullptr && this->tailBlock->next->template is_empty<explicit_context>()) {
                                                                                        ^
concurrentqueue/concurrentqueue.h:1586:96: error:   expected a type, got ‘explicit_context’
concurrentqueue/concurrentqueue.h: In member function ‘bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue_bulk(It, moodycamel::ConcurrentQueue<T, Traits>::size_t)’:
concurrentqueue/concurrentqueue.h:1791:168: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::is_empty’
 while (blockBaseDiff > 0 && this->tailBlock != nullptr && this->tailBlock->next != firstAllocatedBlock && this->tailBlock->next->template is_empty<explicit_context>()) {
                                                                                                                                                                    ^
concurrentqueue/concurrentqueue.h:1791:168: error:   expected a type, got ‘explicit_context’
concurrentqueue/concurrentqueue.h: In destructor ‘moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::~ExplicitProducer()’:
concurrentqueue/concurrentqueue.h:1538:51: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::is_empty’
  if (block->template is_empty<explicit_context>()) {
                                               ^
concurrentqueue/concurrentqueue.h:1538:51: error:   expected a type, got ‘explicit_context’
concurrentqueue/concurrentqueue.h: In member function ‘bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue(U&&)’:
concurrentqueue/concurrentqueue.h:1586:96: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::is_empty’
 if (this->tailBlock != nullptr && this->tailBlock->next->template is_empty<explicit_context>()) {
                                                                                            ^
concurrentqueue/concurrentqueue.h:1586:96: error:   expected a type, got ‘explicit_context’
concurrentqueue/concurrentqueue.h: In member function ‘bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue_bulk(It, moodycamel::ConcurrentQueue<T, Traits>::size_t)’:
concurrentqueue/concurrentqueue.h:1791:168: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::is_empty’
 while (blockBaseDiff > 0 && this->tailBlock != nullptr && this->tailBlock->next != firstAllocatedBlock && this->tailBlock->next->template is_empty<explicit_context>()) {
                                                                                                                                                                    ^

Funny enough somebody has already tried to fix it just 3 days ago [gituhub]GATB/bcalm@be7bda8 so you might have a look at it.

Thanks for your work.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions