Skip to content

Commit

Permalink
Hrs3300: fix includes for std::begin/std::end
Browse files Browse the repository at this point in the history
Fix for Hrs3300 PR about Atomic HRS reads:
#1845

We use `std::begin` and `std::end`, but we don't include one of the
headers that define those functions.
See https://en.cppreference.com/w/cpp/iterator/begin for a list of
headers that define `std::begin` and `std::end`.

Starting with GCC 14 this leads to a compilation error presumably
because they cleaned up their headers.

Fix code by inlcuding `<iterator>`
  • Loading branch information
NeroBurner authored and FintasticMan committed Sep 22, 2024
1 parent ad3bf49 commit 997e4ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/drivers/Hrs3300.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "drivers/Hrs3300.h"
#include <algorithm>
#include <iterator>
#include <nrf_gpio.h>

#include <FreeRTOS.h>
Expand Down

0 comments on commit 997e4ce

Please sign in to comment.