Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: use of overloaded operator '-' is ambiguous #1087

Open
yurivict opened this issue Mar 15, 2023 · 1 comment
Open

error: use of overloaded operator '-' is ambiguous #1087

yurivict opened this issue Mar 15, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@yurivict
Copy link

Bug Description

/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: error: use of overloaded operator '-' is ambiguous (with operand types 'std::basic_ostream<char>::pos_type' (aka 'fpos<__mbstate_t>') and 'int64_t' (aka 'long'))
  return fs->tellp() - offset;
         ~~~~~~~~~~~ ^ ~~~~~~
/usr/include/c++/v1/string:577:37: note: candidate function
    _LIBCPP_INLINE_VISIBILITY fpos  operator- (streamoff __off) const {fpos __t(*this); __t -= __off; return __t;}
                                    ^
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, long)
  return fs->tellp() - offset;
                     ^
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(float, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(double, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long double, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(int, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, float)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, double)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, long double)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, int)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, long long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, __int128)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, unsigned int)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, unsigned long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, unsigned long long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(long long, unsigned __int128)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(__int128, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(unsigned int, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(unsigned long, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(unsigned long long, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:75:22: note: built-in candidate operator-(unsigned __int128, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: error: use of overloaded operator '-' is ambiguous (with operand types 'std::basic_istream<char>::pos_type' (aka 'fpos<__mbstate_t>') and 'int64_t' (aka 'long'))
  return fs->tellg() - offset;
         ~~~~~~~~~~~ ^ ~~~~~~
/usr/include/c++/v1/string:577:37: note: candidate function
    _LIBCPP_INLINE_VISIBILITY fpos  operator- (streamoff __off) const {fpos __t(*this); __t -= __off; return __t;}
                                    ^
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, long)
  return fs->tellg() - offset;
                     ^
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(float, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(double, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long double, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(int, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, float)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, double)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, long double)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, int)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, long long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, __int128)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, unsigned int)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, unsigned long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, unsigned long long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(long long, unsigned __int128)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(__int128, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(unsigned int, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(unsigned long, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(unsigned long long, long)
/usr/ports/math/flashlight/work/flashlight-0.4.0/flashlight/fl/dataset/FileBlobDataset.cpp:83:22: note: built-in candidate operator-(unsigned __int128, long)
2 errors generated.

Reproduction Steps

Regular build.

Platform and Hardware

FreeBSD 13.1

Additional Context

clang-14

Version: 0.4.0

@yurivict yurivict added the bug Something isn't working label Mar 15, 2023
@jacobkahn
Copy link
Member

@yurivict feel free to submit a fix, else I will soon. Working on getting a clang 14 baseline in CI.

@jacobkahn jacobkahn self-assigned this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants