UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.27k stars 2.48k forks source link

signal.hpp in pangolin causes problems - pangolin v0.5 #381

Open UcefMountacer opened 2 years ago

UcefMountacer commented 2 years ago

HI,

I get this error when building ORB_SLAM3. I'm using pangolin 0.6 and I keep getting these errors:

This is just a subset, but all of them are about the signal.hpp file.

Thanks for the help

/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:79: error: ‘decay_t’ is not a member of ‘std’; did you mean ‘decay’?
  109 | constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
      |                                                                               ^~~~~~~
      |                                                                               decay
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:79: error: ‘decay_t’ is not a member of ‘std’; did you mean ‘decay’?
  109 | constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
      |                                                                               ^~~~~~~
      |                                                                               decay
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:87: error: template argument 1 is invalid
  109 | constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
      |                                                                                       ^
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:92: error: ‘::value’ has not been declared
  109 | constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
      |                                                                                            ^~~~~
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:132:53: error: ‘remove_pointer_t’ is not a member of ‘std’; did you mean ‘remove_pointer’?
  132 |                                                std::remove_pointer_t<T>>::value;
      |                                                     ^~~~~~~~~~~~~~~~
      |                                                     remove_pointer
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:132:53: error: ‘remove_pointer_t’ is not a member of ‘std’; did you mean ‘remove_pointer’?
  132 |                                                std::remove_pointer_t<T>>::value;
      |                                                     ^~~~~~~~~~~~~~~~
      |                                                     remove_pointer
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:132:70: error: template argument 2 is invalid
  132 |                                                std::remove_pointer_t<T>>::value;
      |                                                                      ^
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:132:75: error: ‘::value’ has not been declared
  132 |                                                std::remove_pointer_t<T>>::value;
      |                                                                           ^~~~~
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:223:32: error: ‘enable_if_t’ is not a member of ‘std’; did you mean ‘enable_if’?
  223 | struct function_traits<T, std::enable_if_t<trait::is_func_v<T>>> {
      |                                ^~~~~~~~~~~
      |                                enable_if
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:223:32: error: ‘enable_if_t’ is not a member of ‘std’; did you mean ‘enable_if’?
  223 | struct function_traits<T, std::enable_if_t<trait::is_func_v<T>>> {
      |                                ^~~~~~~~~~~
      |                                enable_if
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:223:62: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class> struct sigslot::detail::function_traits’
  223 | struct function_traits<T, std::enable_if_t<trait::is_func_v<T>>> {
      |                                                              ^~
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:223:62: note:   expected a type, got ‘(<expression error> < is_func_v<T>)’
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:223:64: error: expected unqualified-id before ‘>’ token
  223 | struct function_traits<T, std::enable_if_t<trait::is_func_v<T>>> {
      |                                                                ^
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:233:33: error: ‘enable_if_t’ is not a member of ‘std’; did you mean ‘enable_if’?
  233 | struct function_traits<T*, std::enable_if_t<trait::is_func_v<T>>> {
      |                                 ^~~~~~~~~~~
      |                                 enable_if
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:233:33: error: ‘enable_if_t’ is not a member of ‘std’; did you mean ‘enable_if’?
  233 | struct function_traits<T*, std::enable_if_t<trait::is_func_v<T>>> {
      |                                 ^~~~~~~~~~~
      |                                 enable_if
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:233:63: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class> struct sigslot::detail::function_traits’
  233 | struct function_traits<T*, std::enable_if_t<trait::is_func_v<T>>> {
      |                                                               ^~
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:233:63: note:   expected a type, got ‘(<expression error> < is_func_v<T>)’
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:233:65: error: expected unqualified-id before ‘>’ token
  233 | struct function_traits<T*, std::enable_if_t<trait::is_func_v<T>>> {
      |                                                                 ^
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:243:32: error: ‘enable_if_t’ is not a member of ‘std’; did you mean ‘enable_if’?
  243 | struct function_traits<T, std::enable_if_t<trait::is_pmf_v<T>>> {
      |                                ^~~~~~~~~~~
      |                                enable_if
/home/youssef/Readar/ORB_SLAM3/Pangolin/components/pango_core/include/sigslot/signal.hpp:243:32: error: ‘enable_if_t’ is not a member of ‘std’; did you mean ‘enable_if’?
  243 | struct function_traits<T, std::enable_if_t<trait::is_pmf_v<T>>> {
      |                                ^~~~~~~~~~~
      |                                enable_if
vguzov commented 2 years ago

Hi! Seems like it's a problem with the new version of Pangolin – the following worked for me:

git clone --recursive https://github.com/stevenlovegrove/Pangolin.git
git checkout d9daba6
<<build and install Pangolin as usual>>
RG2806 commented 2 years ago

change the compiler version in cmakelists.txt to ++14