Skip to content

Cannot use C++ range-v3 library #142

@shyun3

Description

@shyun3

Describe the bug
The C++ reference clearly lists range-v3 as available but including its headers conflicts with the test suite.

To Reproduce
Without changing anything else, try including a range-v3 header at the top of the file and try compiling. Example:

#include <range/v3/all.hpp>

Expected behavior
If the code compiled before, it should continue compiling. Instead error messages such as the following are emitted:

In file included from main.cpp:6:
In file included from ./solution.cpp:4:
In file included from /usr/local/include/range/v3/all.hpp:17:
In file included from /usr/local/include/range/v3/action.hpp:32:
In file included from /usr/local/include/range/v3/action/split.hpp:30:
/usr/local/include/range/v3/view/split.hpp:100:24: error: expected member name or ';' after declaration specifiers
            It curr_ = It();
                       ^~~~
/usr/local/include/igloo/core/alternativeregistrationaliases.h:22:22: note: expanded from macro 'It'
#define It(specName) \
                     ^
/usr/local/include/igloo/core/registration.h:50:3: note: expanded from macro '\
IGLOO_SPEC_REGISTRATION'
  IGLOO_PRIVATE_SPEC_REGISTRATION(specName, false, false)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/igloo/core/registration.h:47:25: note: expanded from macro 'IGLOO_PRIVATE_SPEC_REGISTRATION'
  virtual void specName()
  ~~~~~~~~~~~~          ^
In file included from main.cpp:6:
In file included from ./solution.cpp:4:
In file included from /usr/local/include/range/v3/all.hpp:17:
In file included from /usr/local/include/range/v3/action.hpp:32:
In file included from /usr/local/include/range/v3/action/split.hpp:30:
/usr/local/include/range/v3/view/split.hpp:100:24: error: expected expression
/usr/local/include/igloo/core/alternativeregistrationaliases.h:22:22: note: expanded from macro 'It'
#define It(specName) \
                     ^
/usr/local/include/igloo/core/registration.h:50:3: note: expanded from macro '\
IGLOO_SPEC_REGISTRATION'
  IGLOO_PRIVATE_SPEC_REGISTRATION(specName, false, false)
  ^
/usr/local/include/igloo/core/registration.h:40:3: note: expanded from macro 'IGLOO_PRIVATE_SPEC_REGISTRATION'
  struct SpecRegistrar_##specName \
  ^
2 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions