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

GCC 14 build errors #4455

Closed
hummeltech opened this issue May 21, 2024 · 4 comments
Closed

GCC 14 build errors #4455

hummeltech opened this issue May 21, 2024 · 4 comments

Comments

@hummeltech
Copy link
Contributor

/mapnik/include/mapnik/grid/grid_view.hpp:109:20: error: no match for ‘operator=’ (operand types are ‘const std::string’ {aka ‘const std::__cxx11::basic_string<char>’} and ‘const std::string’ {aka ‘const std::__cxx11::basic_string<char>’})
  109 |         key_ = rhs.key_;
      |                    ^~~~

/mapnik/include/mapnik/grid/grid_view.hpp:110:24: error: no match for ‘operator=’ (operand types are ‘const std::string’ {aka ‘const std::__cxx11::basic_string<char>’} and ‘const std::string’ {aka ‘const std::__cxx11::basic_string<char>’})
  110 |         id_name_ = rhs.id_name_;
      |                        ^~~~~~~~

/mapnik/include/mapnik/grid/grid_view.hpp:111:22: error: no match for ‘operator=’ (operand types are ‘const std::set<std::__cxx11::basic_string<char> >’ and ‘const std::set<std::__cxx11::basic_string<char> >’)
  111 |         names_ = rhs.names_;
      |                      ^~~~~~

/mapnik/include/mapnik/grid/grid_view.hpp:113:25: error: no match for ‘operator=’ (operand types are ‘const mapnik::hit_grid_view<T>::feature_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, std::shared_ptr<mapnik::feature_impl> >’} and ‘const mapnik::hit_grid_view<T>::feature_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, std::shared_ptr<mapnik::feature_impl> >’})
  113 |         features_ = rhs.features_;
      |                         ^~~~~~~~~

https://gcc.gnu.org/gcc-14/changes.html

hit_grid_view<T>& operator=(hit_grid_view<T> const& rhs)
{
if (&rhs == this)
return *this;
x_ = rhs.x_;
y_ = rhs.y_;
width_ = rhs.width_;
height_ = rhs.height_;
data_ = rhs.data_;
key_ = rhs.key_;
id_name_ = rhs.id_name_;
names_ = rhs.names_;
f_keys_ = rhs.f_keys_;
features_ = rhs.features_;
return *this;
}

@tomhughes
Copy link
Contributor

This will be an assignment operator that is never used, and was never actually usable, but is now reported even though it is never actually used.

@hummeltech
Copy link
Contributor Author

Thank you for the clarification, I had a feeling it might not be in use.

@artemp
Copy link
Member

artemp commented May 21, 2024

@hummeltech @tomhughes

How about

hit_grid_view<T>& operator=(hit_grid_view<T> const& rhs) = delete;

I don't think we need a copy assignment operator for grid_view

@hummeltech
Copy link
Contributor Author

@artemp, thanks for the help, the commit 653d8b7 does indeed resolve the issue mentioned in the description!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants