HuaYuXiao / Fast-Planner

[RA-L 2019] A Robust and Efficient Trajectory Planner for Quadrotors
GNU General Public License v3.0
3 stars 0 forks source link

expected ‘,’ or ‘...’ before ‘!’ token #19

Closed HuaYuXiao closed 6 months ago

HuaYuXiao commented 6 months ago
  105 |     static bool likely(const string_type& str)
      |                 ^~~~~~
/usr/include/boost/date_time/special_values_parser.hpp:105:17: error: expected ‘,’ or ‘...’ before ‘!’ token
In file included from /usr/include/boost/date_time/format_date_parser.hpp:17,
                 from /usr/include/boost/date_time/date_generator_parser.hpp:20,
                 from /usr/include/boost/date_time/date_facet.hpp:25,
                 from /usr/include/boost/date_time/gregorian/gregorian_io.hpp:16,
                 from /usr/include/boost/date_time/gregorian/gregorian.hpp:31,
                 from /usr/include/boost/date_time/posix_time/time_formatters.hpp:12,
                 from /usr/include/boost/date_time/posix_time/posix_time.hpp:24,
                 from /usr/include/pcl-1.10/pcl/io/boost.h:57,
                 from /usr/include/pcl-1.10/pcl/io/file_io.h:42,
                 from /usr/include/pcl-1.10/pcl/io/pcd_io.h:44,
                 from /opt/ros/noetic/include/pcl_conversions/pcl_conversions.h:70,
                 from /home/hyx020222/planner_ws/src/Fast-Planner/plan_env/include/plan_env/global_point_sdf.h:17,
                 from /home/hyx020222/planner_ws/src/Fast-Planner/plan_env/include/plan_env/edt_environment.h:11,
                 from /home/hyx020222/planner_ws/src/Fast-Planner/plan_env/src/edt_environment.cpp:1:
/usr/include/boost/date_time/special_values_parser.hpp: In static member function ‘static bool boost::date_time::special_values_parser<date_type, charT>::__builtin_expect(int)’:
/usr/include/boost/date_time/special_values_parser.hpp:107:14: error: ‘str’ was not declared in this scope; did you mean ‘std’?
  107 |         if (!str.empty()) {
      |              ^~~
      |              std
In file included from /home/hyx020222/planner_ws/src/Fast-Planner/plan_env/ThirdParty/sdf_tools/include/sdf_tools/collision_map.hpp:6,
                 from /home/hyx020222/planner_ws/src/Fast-Planner/plan_env/include/plan_env/edt_environment.h:9,
                 from /home/hyx020222/planner_ws/src/Fast-Planner/plan_env/src/edt_environment.cpp:1:
/usr/include/boost/date_time/time_parsing.hpp: In function ‘time_type boost::date_time::parse_iso_time(const string&, char)’:
/usr/include/boost/date_time/time_parsing.hpp:312:19: error: no match for ‘operator!’ (operand type is ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’})
  312 |     if (svp_type::likely(s)) {
      |                   ^~~~~~
HuaYuXiao commented 6 months ago
cd /usr/include/boost
sudo gedit /date_time/special_values_parser.hpp

Remove following from libboost1.71:

    static bool likely(const string_type& str)
    {
        if (!str.empty()) {
            switch (str[0]) {
                // See string definitions at the end of this class..
                case '+':
                case '-':
                case 'n':
                case 'm':
                    return true;

                default:
                    break;
            }
        }

        return false;
    }

Which is new compared to libboost1.65.1