ucla-vision / xivo

X Inertial-aided Visual Odometry
Other
851 stars 120 forks source link

enable_if error #25

Closed agrawalparth10 closed 2 years ago

agrawalparth10 commented 3 years ago

Hi, I am building xivo on MacOS Catalina. Getting the following error on running build.sh

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:542:78: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
                                                                             ^~~
xivo/common/component.h:56:8: note: in instantiation of template type alias 'enable_if_t' requested here
  std::enable_if_t<!has_tangent<State>, void>
       ^
xivo/src/estimator.h:71:26: note: in instantiation of template class 'xivo::Component<xivo::Estimator, xivo::State>' requested here
class Estimator : public Component<Estimator, State> {

I am getting similar errors across different files. Any suggestions on how to resolve it?

Thank you!

stephanietsuei commented 3 years ago

I have never compiled xivo on any MacOS, but it looks like you are using a C++ compiler that doesn't support a particular language feature that we use. So far, we've only tested xivo using g++-7 and Ubuntu 16.04 and Ubuntu 18.04.

stephanietsuei commented 2 years ago

For the sake of remote work, we're going to fix this. So far, this is what we see:

@agrawalparth10, I'll get it working on the later versions of gcc first. Then I'll have you test on whatever version of Mac OS you're using.

stephanietsuei commented 2 years ago

I think this is fixed in commit 6be78260f8f0daccf3f01b17b68da271be5f7f16. Current status:

agrawalparth10 commented 2 years ago

Okay, I will try to compile it today

stephanietsuei commented 2 years ago

Addressed in #28