Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error introduced since 6.18.3 #1622

Closed
labodj opened this issue Aug 2, 2021 · 2 comments
Closed

Compilation error introduced since 6.18.3 #1622

labodj opened this issue Aug 2, 2021 · 2 comments
Labels
Milestone

Comments

@labodj
Copy link

labodj commented Aug 2, 2021

Hi @bblanchon,
I updated this library from 6.18.2 to 6.18.3 and I'm experiencing compilation errors, everything was fine in 6.18.2

I'm compiling using avr-gcc 11.1.0 with c++20 features for an Arduino mega 2560

These are the errors:

/ArduinoJson/src/ArduinoJson/Strings/Adapters/ConstRamStringAdapter.hpp:48:32: error: expected unqualified-id before 'const'
/ArduinoJson/src/ArduinoJson/Strings/Adapters/ConstRamStringAdapter.hpp:48:32: error: expected ')' before 'const'
/ArduinoJson/src/ArduinoJson/Strings/Adapters/ArduinoStringAdapter.hpp:48:37: error: expected unqualified-id before 'const'
/ArduinoJson/src/ArduinoJson/Strings/Adapters/ArduinoStringAdapter.hpp:48:37: error: expected ')' before 'const'

The first error is located here:

template <int N>
class StringAdapter<const char[N]> : public StringAdapter<const char*> {
 public:
  StringAdapter<const char[N]>(const char* s) : StringAdapter<const char*>(s) {}
};

The second one is located here:

template <>
class StringAdapter< ::StringSumHelper> : public StringAdapter< ::String> {
 public:
  StringAdapter< ::StringSumHelper>(const ::String& s)
      : StringAdapter< ::String>(s) {}
};

Since 6.18.2 the 2 files above have been modified with these commits:
5790f3c
6632fa8

@bblanchon
Copy link
Owner

Hi @labodj,

Thank you very much for reporting this bug 👍
It should be fixed in the 6.x branch.

Best regards,
Benoit

@bblanchon bblanchon added this to the v6.18.4 milestone Aug 13, 2021
@bblanchon
Copy link
Owner

The fix was published in ArduinoJson 6.18.4.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants