concurrentqueue
concurrentqueue copied to clipboard
BLOCK_SIZE defined by linux/fs.h
Hi,
concurrentqueue does not compile if included after <linux/fs.h> because the latter defines BLOCK_SIZE :(
example:
$ echo '
#include <linux/fs.h>
#include "concurrentqueue.h"
int main() {}' | g++ -x c++ -
In file included from <stdin>:2:
concurrentqueue.h:342:29: error: expected unqualified-id before numeric constant
342 | static const size_t BLOCK_SIZE = 32;
| ^~~~~~~~~~
concurrentqueue.h:342:29: error: expected ‘)’ before numeric constant
342 | static const size_t BLOCK_SIZE = 32;
| ^~~~~~~~~~
concurrentqueue.h:762:29: error: expected unqualified-id before numeric constant
762 | static const size_t BLOCK_SIZE = static_cast<size_t>(Traits::BLOCK_SIZE);
| ^~~~~~~~~~
concurrentqueue.h:762:29: error: expected ‘)’ before numeric constant
762 | static const size_t BLOCK_SIZE = static_cast<size_t>(Traits::BLOCK_SIZE);
| ^~~~~~~~~~