Using STL in platformio for arduino atmelsam causes build errors

Hi everyone. So I’m trying to use the STL in my project. I’m building for an ARduino MKR WiFi 1010 and I constantly receive these build errors:
Screen Shot 2020-12-02 at 9.49.22 PM

Here is my platformio.ini:

platform = atmelsam
board = mkrwifi1010
board_build.mcu = samd21g18a
framework = arduino
lib_deps = 

I’ve also tried ArduinoSTL and ETL and they’ve also caused build issues. Is there some way to make this work?

The Arduino.h macros for min and max conflict the standard library’s definition of the templated std::min and std::max functions. #undef both macros before including STL headers.