m5stack / M5StickC

M5StickC Arduino Library
MIT License
476 stars 221 forks source link

changed the name of min macro to resolve conflicts with STL #139

Closed dieu-detruit closed 1 year ago

dieu-detruit commented 3 years ago

Thank you for the M5StickC library. It's very helpful for my development.

As the issues #132 #103 describe, compilation errors occur when using <bitset> or <sstream>, etc. They are caused by the name conflict between these two:

It can be solved by including STL headers before , but the min macro is unused anywhere in the M5StickC library, so it seems to be better to change the name of macro.

In my local test, program with bitset or sstream was successfully compiled.

Tinyu-Zhao commented 1 year ago

fixed,https://github.com/m5stack/M5StickC/commit/9b92d2781a0e3f6a2d8186884066bd2a1bbf981a

dieu-detruit commented 1 year ago

Thank you!