Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editing "typename I" to "typename T" due to error: expected nested-na… #250

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

esromneb
Copy link
Contributor

…me-specifier before ‘(’ token

on c++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

Full error:

In file included from /usr/include/c++/5/complex.h:36:0,
                 from /home/x/modem_main.cpp:5:
/usr/local/include/zmq.hpp:221:27: error: expected nested-name-specifier before ‘(’ token
         template<typename I> message_t(I first, I last):
                           ^
/usr/local/include/zmq.hpp:221:27: error: expected ‘)’ before ‘__extension__’
         template<typename I> message_t(I first, I last):
                           ^
/usr/local/include/zmq.hpp:221:27: error: expected ‘>’ before ‘__extension__’
/usr/local/include/zmq.hpp:221:27: error: expected unqualified-id before ‘)’ token
         template<typename I> message_t(I first, I last):
                           ^
/usr/local/include/zmq.hpp:644:27: error: expected nested-name-specifier before ‘(’ token
         template<typename I> bool send(I first, I last, int flags_=0)
                           ^
/usr/local/include/zmq.hpp:644:27: error: expected ‘)’ before ‘__extension__’
         template<typename I> bool send(I first, I last, int flags_=0)
                           ^
/usr/local/include/zmq.hpp:644:27: error: expected ‘>’ before ‘__extension__’
/usr/local/include/zmq.hpp:644:27: error: expected unqualified-id before ‘)’ token
         template<typename I> bool send(I first, I last, int flags_=0)
                           ^
/usr/local/include/zmq.hpp:644:27: error: expected nested-name-specifier before ‘(’ token
         template<typename I> bool send(I first, I last, int flags_=0)
                           ^
/usr/local/include/zmq.hpp:644:27: error: expected ‘)’ before ‘__extension__’
         template<typename I> bool send(I first, I last, int flags_=0)
                           ^
/usr/local/include/zmq.hpp:644:27: error: expected ‘>’ before ‘__extension__’
/usr/local/include/zmq.hpp:644:27: error: expected unqualified-id before ‘)’ token
         template<typename I> bool send(I first, I last, int flags_=0)

I am compiling with cmake but the compile flags seems to be:

/usr/bin/c++   -I/home/x/inc -I/usr/local/include  -fvisibility-inlines-hidden -Wno-unused-parameter -Wno-return-type -O3 -DNDEBUG   -Wall -Wextra -fvisibility=hidden -std=gnu++14 -o CMakeFiles/zmq_test_1.dir/src/test_zmq.cpp.o -c /home/x/test_zmq.cpp

…me-specifier before ‘(’ token

on c++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
@coveralls
Copy link

Pull Request Test Coverage Report for Build 122

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.706%

Totals Coverage Status
Change from base Build 121: 0.0%
Covered Lines: 359
Relevant Lines: 462

💛 - Coveralls

@sigiesec
Copy link
Member

This is a strange problem. It looks as if "I" is some macro in your environment. I think that "T" was not used on purpose, as it is not commonly used for iterator types. Could you maybe change this to "It" instead of "T"?

@esromneb
Copy link
Contributor Author

I changed it a few values and it worked, you are probably right about the macro in my environment

@kurdybacha
Copy link
Contributor

kurdybacha commented Jun 14, 2018

T is the most common name used in templates. I would not change that based on one environment issue. @esromneb but thanks for the pull request, that is really cool when someone provides fix when reporting the issue. Do you think you can close the issue now?

@sigiesec
Copy link
Member

I think if this is true this is only because there are so many template arguments that end up as or correspond to some value_type, which is not the case here. However, this can be aligned outside this PR, so I will merge this.

@sigiesec sigiesec merged commit 837c0c9 into zeromq:master Jun 15, 2018
@esromneb
Copy link
Contributor Author

Turns out this was caused by #include <complex.h> (included by my project) which defines I

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants