Commit c585ab0
committed
libpisp: Switch to C++20 standard
Switch the default build to use C++ 20 standard. There is a compile
failure regarding and "ambiguous operator", fix this:
In file included from /usr/include/boost/assert.hpp:64,
from /usr/include/boost/log/detail/attachable_sstream_buf.hpp:24,
from /usr/include/boost/log/utility/formatting_ostream.hpp:33,
from /usr/include/boost/log/sources/record_ostream.hpp:36,
from /usr/include/boost/log/trivial.hpp:24,
from ../subprojects/libpisp/src/libpisp/common/logging.hpp:17,
from ../subprojects/libpisp/src/libpisp/backend/tiling/input_stage.cpp:9:
../subprojects/libpisp/src/libpisp/backend/tiling/input_stage.cpp: In member function ‘virtual void tiling::InputStage::PushCropDown(tiling::Interval, tiling::Dir)’:
../subprojects/libpisp/src/libpisp/backend/tiling/input_stage.cpp:95:33: warning: C++20 says that these are ambiguous, even though the second is reversed:
95 | PISP_ASSERT(interval == input_interval_);
| ^~~~~~~~~~~~~~~
../subprojects/libpisp/src/libpisp/backend/tiling/input_stage.cpp:95:9: note: in expansion of macro ‘PISP_ASSERT’
95 | PISP_ASSERT(interval == input_interval_);
| ^~~~~~~~~~~
In file included from ../subprojects/libpisp/src/libpisp/backend/tiling/stages.hpp:11,
from ../subprojects/libpisp/src/libpisp/backend/tiling/input_stage.hpp:9,
from ../subprojects/libpisp/src/libpisp/backend/tiling/input_stage.cpp:7:
../subprojects/libpisp/src/libpisp/backend/tiling/types.hpp:64:14: note: candidate 1: ‘bool tiling::Interval::operator==(const tiling::Interval&)’
64 | bool operator==(Interval const &other) { return offset == other.offset && length == other.length; }
| ^~~~~~~~
../subprojects/libpisp/src/libpisp/backend/tiling/types.hpp:64:14: note: candidate 2: ‘bool tiling::Interval::operator==(const tiling::Interval&)’ (reversed)
../subprojects/libpisp/src/libpisp/backend/tiling/types.hpp:64:14: note: try making the operator a ‘const’ member function
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>1 parent cc4b18f commit c585ab0
2 files changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
| 107 | + | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments