godotengine / godotengine/godot-cpp
CameraMatrix.cpp: error: call of overloaded 'abs(real_t&)' is ambiguous
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
```
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src\core\AABB.o -c -O3 -std=c++14 -Wwrite-strings -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\AABB.cpp
g++ -o src\core\CameraMatrix.o -c -O3 -std=c++14 -Wwrite-strings -I. -Igodot_headers -Iinclude -Iinclude\gen -Iinclude\core src\core\CameraMatrix.cpp
=====
src\core\CameraMatrix.cpp: In member function 'real_t CameraMatrix::get_fov() const':
src\core\CameraMatrix.cpp:588:47: error: call of overloaded 'abs(real_t&)' is ambiguous
return rad2deg(acos(abs(right_plane.normal.x))) * 2.0;
^
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:75:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\stdlib.h:36,
from c:\mingw\include\malloc.h:20,
from include\core/Defs.hpp:68,
from include\core/CameraMatrix.hpp:4,
from src\core\CameraMatrix.cpp:31:
c:\mingw\include\stdlib.h:509:38: note: candidate: int abs(int)
_CRTIMP __cdecl __MINGW_NOTHROW int abs (int) __MINGW_ATTRIB_CONST;
^~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\stdlib.h:36:0,
from c:\mingw\include\malloc.h:20,
from include\core/Defs.hpp:68,
from include\core/CameraMatrix.hpp:4,
from src\core\CameraMatrix.cpp:31:
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
src\core\CameraMatrix.cpp:597:46: error: call of overloaded 'abs(real_t&)' is ambiguous
return rad2deg(acos(abs(left_plane.normal.x))) + rad2deg(acos(abs(right_plane.normal.x)));
^
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:75:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\stdlib.h:36,
from c:\mingw\include\malloc.h:20,
from include\core/Defs.hpp:68,
from include\core/CameraMatrix.hpp:4,
from src\core\CameraMatrix.cpp:31:
c:\mingw\include\stdlib.h:509:38: note: candidate: int abs(int)
_CRTIMP __cdecl __MINGW_NOTHROW int abs (int) __MINGW_ATTRIB_CONST;
^~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\stdlib.h:36:0,
from c:\mingw\include\malloc.h:20,
from include\core/Defs.hpp:68,
from include\core/CameraMatrix.hpp:4,
from src\core\CameraMatrix.cpp:31:
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
src\core\CameraMatrix.cpp:597:89: error: call of overloaded 'abs(real_t&)' is ambiguous
return rad2deg(acos(abs(left_plane.normal.x))) + rad2deg(acos(abs(right_plane.normal.x)));
^
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:75:0,
from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\stdlib.h:36,
from c:\mingw\include\malloc.h:20,
from include\core/Defs.hpp:68,
from include\core/CameraMatrix.hpp:4,
from src\core\CameraMatrix.cpp:31:
c:\mingw\include\stdlib.h:509:38: note: candidate: int abs(int)
_CRTIMP __cdecl __MINGW_NOTHROW int abs (int) __MINGW_ATTRIB_CONST;
^~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\stdlib.h:36:0,
from c:\mingw\include\malloc.h:20,
from include\core/Defs.hpp:68,
from include\core/CameraMatrix.hpp:4,
from src\core\CameraMatrix.cpp:31:
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
=====
scons: *** [src\core\CameraMatrix.o] Error 1
scons: building terminated because of errors.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.