Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

error: call to 'abs' is ambiguous #1

Open
ryandesign opened this issue Jan 28, 2020 · 0 comments
Open

error: call to 'abs' is ambiguous #1

ryandesign opened this issue Jan 28, 2020 · 0 comments

Comments

@ryandesign
Copy link

obby 0.4.8 does not build with Apple LLVM version 9.1.0 (clang-902.0.39.2) (from Xcode 9.4.1) on macOS High Sierra 10.13.6:

colour.cpp:50:9: error: call to 'abs' is ambiguous
        return abs(m_red - colour.m_red) +
               ^~~
/usr/include/stdlib.h:137:6: note: candidate function
int      abs(int) __pure2;
         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
                                           ^
colour.cpp:51:9: error: call to 'abs' is ambiguous
               abs(m_green - colour.m_green) +
               ^~~
/usr/include/stdlib.h:137:6: note: candidate function
int      abs(int) __pure2;
         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
                                           ^
colour.cpp:52:9: error: call to 'abs' is ambiguous
               abs(m_blue - colour.m_blue) < 32;
               ^~~
/usr/include/stdlib.h:137:6: note: candidate function
int      abs(int) __pure2;
         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
                                           ^
3 errors generated.
ryandesign referenced this issue in macports/macports-ports Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant