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

roscpp: Fix clashing namespaces for ros::param::set #302

Closed
wants to merge 1 commit into from

Conversation

smits
Copy link

@smits smits commented Oct 15, 2013

Compiling on RHEL with gcc 4.4.6 resulted in the following error:

/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/stl_set.h: In function 'void ros::param::setImpl(const std::string&, const std::vector<T, std::allocator<_CharT> >&)':
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/stl_set.h:87: error: 'template<class _Key, class _Compare, class _Alloc> class std::set' is not a function,
/home/codac-dev/rpmbuild/BUILD/ros-hydro-core-1.9.50/src/roscpp/include/ros/param.h:161: error:   conflict with 'void ros::param::set(const std::string&, const std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool> > >&)'

Apparently the set was clashing with std::set for some reason.

Signed-off-by: Ruben Smits ruben.smits@intermodalics.eu

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
@dirk-thomas
Copy link
Member

Can you please clarify what exactly you are compiling and how? Is it just ros_comm or also any custom code?

It seems that the invocation of set() (https://github.com/smits/ros_comm/blob/9c133c6a761f73accbe674af9df1f64c0db49051/clients/roscpp/src/libros/param.cpp#L127) is ambiguous when compiling param.cpp. This would make sense if any code before would define using namespace std but since it is happening in a cpp file rather than a header (and ROS does not use using namespace in headers) I don't know where that should be coming from.

@smits
Copy link
Author

smits commented Oct 30, 2013

I was compiling the ROS Hydro Bare flavour from source in a catkin workspace on ...

lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseWorkstation
Description:    Red Hat Enterprise Linux Workstation release 6.3 (Santiago)
Release:    6.3
Codename:   Santiago

using

gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)

@dirk-thomas
Copy link
Member

I can reproduce the issue under Ubuntu Quantal when using gcc-4.4.

@ghost ghost assigned dirk-thomas Nov 1, 2013
dirk-thomas added a commit that referenced this pull request Nov 1, 2013
contradict pushed a commit to contradict/ros_comm that referenced this pull request Aug 12, 2016
rqt_reconfigure: Fix background colors for dark themes
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.

2 participants