kendryte-standalone-sdk icon indicating copy to clipboard operation
kendryte-standalone-sdk copied to clipboard

min/max macros makes most c++ containers useless

Open duncmac16 opened this issue 4 years ago • 0 comments

Make sure you read and understand this document. Use one of the two templates below and delete the rest.

  • [x] BUG REPORT
  • [ ] FEATURE REQUEST

BUG REPORT I am trying to use the Arduino framework that relies on the standalone sdk and came across the min/max macros. These two macros make most C++ containers useless as they no longer compile correctly. The container classes use the std::numeric_limits<T>::max() function, hence the compiler target no longer makes sense.

Expected behaviour

There should be no lower-case min or max macro's. Only inline functions.

Actual behavior

Test code

Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.

#include <array>

int main() {
   std::array<int, 1> a;
}

Hardware

Sipeed Maixduino

System

MacOS

duncmac16 avatar Nov 30 '20 23:11 duncmac16