Giter Club home page Giter Club logo

Comments (6)

bblanchon avatar bblanchon commented on August 15, 2024

Hello Mario,

The "placement new" that I'm using is part of the standard library and in most environments you just need to add the following line:

#include <new>

What you see in my PlacementNew.hpp is a workaround for the Arduino environment that lacks many standard features.

Please try to replace the following line in PlacementNew.hpp:

#ifdef ARDUINO

by

#if 0

so as to disable the workaround for Arduino.

from arduinojson.

bblanchon avatar bblanchon commented on August 15, 2024

Hi again,

I'd like to reproduce the bug on my computer.
What IDE are you using?
Is it the "LinkIt SDK for Arduino"?

from arduinojson.

highfield avatar highfield commented on August 15, 2024

Yes, that's the SDK I'm using (on VS 2013, but I don't think matters).

Benoit, I think I got it, although I wouldn't deserve any merit, because my 99% of luck and 1% of ability.
Simply I commented out the "inline" declaration in your PlacementNew, as well as the "#include " at the bottom. Doing that I guess the module is completely useless.
However, simply "removing" the PlacementNew content, the compilation raises several errors like:

JsonArray.hpp:In file included from
JsonArray.cpp:from
List.hpp:In member function 'ArduinoJson::Internals::ListNode* ArduinoJson::Internals::List::createNode() [with T = ArduinoJson::JsonVariant]'
JsonArray.cpp:instantiated from here
List.hpp:56: error: no matching function for call to 'operator new(unsigned int, void_&)'
:void_ operator new(unsigned int)

So, my attempt was to place an "#include " in the List.hpp module, and nowhere else. That's working fine.

P.S. Today I'll leave for a short holiday, so I won't able to put my hands on in a brief...

from arduinojson.

bblanchon avatar bblanchon commented on August 15, 2024

Hi Mario,
Any update on that issue?

from arduinojson.

highfield avatar highfield commented on August 15, 2024

Huh?...There's no "update", because was already solved as above descripted: the library works fine.
The compilation (and thus the runtime) are working fine by simply:

  • commenting out the "inline" directive within the PlacementNew module;
  • adding (substituting the above one) the "#include " in the List.hpp module.

Should I perform any other test?

from arduinojson.

bblanchon avatar bblanchon commented on August 15, 2024

OK, thanks for the clarification.

You're not the only one having issues with the placement new definitions.
I think I'll just remove it from the next release.

from arduinojson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.