Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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