Skip to content

Commit

Permalink
fix algorithm header include
Browse files Browse the repository at this point in the history
The file is using `std::find_if` without specifying the `algorithm`
include. It has probably transitively included it previously.

Without it, the redpanda open source build fails with the following:
```
/var/lib/buildkite-agent/builds/buildkite-amd64-builders-i-02d9cb4eee45a1cf5-1/redpanda/redpanda/build/release-ci/_deps/avro-src/lang/c++/impl/Node.cc:112:73: error: no member named 'find_if' in namespace 'std'; did you mean 'std::ranges::find_if'?
  112 |     if (!ns_.empty() && (ns_[0] == '.' || ns_[ns_.size() - 1] == '.' || std::find_if(ns_.begin(), ns_.end(), invalidChar1) != ns_.end())) {
      |                                                                         ^~~~~~~~~~~~
      |                                                                         std::ranges::find_if
```
  • Loading branch information
pgellert committed Aug 12, 2024
1 parent af673ea commit a0dafd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lang/c++/impl/Node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* limitations under the License.
*/

#include <algorithm>
#include <cmath>
#include <unordered_set>

Expand Down
1 change: 1 addition & 0 deletions lang/c++/impl/parsing/Symbol.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#ifndef avro_parsing_Symbol_hh__
#define avro_parsing_Symbol_hh__

#include <algorithm>
#include <map>
#include <set>
#include <sstream>
Expand Down

0 comments on commit a0dafd5

Please sign in to comment.