Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #1622
Closed
Open
Issue created Aug 02, 2021 by Administrator@rootContributor

Compilation error introduced since 6.18.3

Created by: labodj

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: 5790f3c8 6632fa8d

Assignee
Assign to
Time tracking