Open-Agriculture / AgIsoStack-plus-plus

AgIsoStack++ is the completely free open-source C++ ISOBUS library for everyone
https://agisostack.com/
MIT License
187 stars 41 forks source link

Removed references to std::make_unique #373

Closed ad3154 closed 10 months ago

ad3154 commented 10 months ago

This is an attempt to expand compatibility with the consumers of the Arduino library, one of whom reported that std::make_unique was causing them to be unable to compile the library.

https://github.com/Open-Agriculture/AgIsoStack-Arduino/issues/7

Interested to hear thoughts on this... I know we are targeting at least C++14 (which is when make_unique was introduced) but this seems like a fairly minor change to bring the Arduino lib back down to C++11

GwnDaan commented 10 months ago

While it hurts me to downgrade the supported C++ standard version to 11, I feel like it's the only reasonable option here. The arduino-ide is widely used among hobbyists and I don't want them to have to follow some cumbersome procedure to be able to compile the stack. I had a shot at it myself, and managed to succeed in changing the version, but only after following a dozen links on google 😒.

Though I'm happy it seems like a pretty quick fix to go back to C++11 with the stack. Can you update the CMakeLists.txt as well, so Github Actions can notify us if we happen to make changes not compliant with C++11?

ad3154 commented 10 months ago

Can you update the CMakeLists.txt as well

Will do

sonarcloud[bot] commented 10 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell C 21 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

ad3154 commented 10 months ago

Can you update the CMakeLists.txt as well

Will do

I know I said will do, but then you did it in #382 😆

Sonar seems mad about C++ 17 things like std::scoped_lock and template type deduction so I'll see if I can modify those rules...