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

no match for ‘operator!’ (operand type is ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’}) #21

Closed HuaYuXiao closed 6 months ago

HuaYuXiao commented 6 months ago
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/time_parsing.hpp

Remove following from libboost1.71:

    typedef special_values_parser<date_type, std::string::value_type> svp_type;

    // given to_iso_string can produce a special value string
    // then from_iso_string should be able to read a special value string
    // the special_values_parser is expensive to set up and not thread-safe
    // so it cannot be static, so we need to be careful about when we use it
    if (svp_type::likely(s)) {
        typedef typename svp_type::stringstream_type ss_type;
        typedef typename svp_type::stream_itr_type itr_type;
        typedef typename svp_type::match_results mr_type;
        svp_type p; // expensive
        mr_type mr;
        ss_type ss(s);
        itr_type itr(ss);
        itr_type end;
        if (p.match(itr, end, mr)) {
            return time_type(static_cast<special_values>(mr.current_match));
        }
    }

Which is new compared to libboost1.65.1