Coder Social home page Coder Social logo

Use of C++11 about class_loader HOT 5 CLOSED

kunaltyagi avatar kunaltyagi commented on August 19, 2024
Use of C++11

from class_loader.

Comments (5)

mikaelarguedas avatar mikaelarguedas commented on August 19, 2024

Can you please clarify what version (or branch) of class_loader you are compiling as well as what version of ROS you are using ? Thanks

from class_loader.

kunaltyagi avatar kunaltyagi commented on August 19, 2024

Oops, sorry for forgetting that. Melodic from rosinstall_generator ros_comm --rosdistro melodic --deps --tar > melodic-ros_comm.rosinstall

from class_loader.

mikaelarguedas avatar mikaelarguedas commented on August 19, 2024

Melodic targets only platforms that have c++14 as their default compiler option:
https://github.com/ros-infrastructure/rep/blob/master/rep-0003.rst#melodic-morenia-may-2018---may-2023
And assumes C++14 not C++98: https://github.com/ros-infrastructure/rep/blob/master/rep-0003.rst#melodic

Could you clarify your use case / setup?

from class_loader.

kunaltyagi avatar kunaltyagi commented on August 19, 2024

I understand the fact that c++14 is the default compiler option on the target platforms.

In that case, should I go ahead with a PR on the rosbag repository for adding the definition explicitly? There's no harm in adding the c++ standard required. Our default compiler has c++14 support but not by default...

Thanks for the links. It seems I was stuck in the past

from class_loader.

mikaelarguedas avatar mikaelarguedas commented on August 19, 2024

There's no harm in adding the c++ standard required.

This will force users to compile the code with the standard hard-coded in the package. If users have compiler defaulting to a higher standard I don't think we should force a downgrade on them

In that case, should I go ahead with a PR on the rosbag repository for adding the definition explicitly?

The policy applies to the entire distribution, I don't think submitting patches to specific packages is a desired approach as this will introduce inconsistencies between packages of the same distribution.

Our default compiler has c++14 support but not by default...

Then I recommend you to pass the c++ standard explicitely to your build tool (or in its configuration if it supports it). e.g. MacOS users currently build by passing -DCMAKE_CXX_STANDARD=14 to their build tools

You can find a similar discussion at ros/catkin#936

from class_loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.