Closed lucae98 closed 4 months ago
Can you please send me a basic example of the code that's failing. How are you initializing the library objects. That will help me understand what's going on.
Thanks, -Brayden
void setup() { Serial.begin(9600);
while (!Serial) { }
UnorderedMap<String, int> uMap;
uMap.put("TestValue", 545);
Serial.println(uMap.get("TestValue")); }
void loop() { }
Thank you very much. I will take a look at your issue tonight and see what I can figure out. I'll let you know what I find
So i am not sure about this error: .pio/libdeps/esp32dev/SimpleVector/src/SimpleVector.h:256:24: error: expected primary-expression before ';' token return T()*; // You can handle this error differently if needed... I was not able to recreate that issue.
BUT:
I was able to solve the other issue:
.pio/libdeps/esp32dev/SimpleVector/src/SimpleVector.h:76:34: error: expected ')' before '<' token
SimpleVector(initializer_list
this issue had to do with your development platform (IE: Expressif/ ESP) ... the way i had coded some compiler directives basically forces you to utilize the initializer list functions that only show up for certain esp boards. I have modified the way the directives function. Now you would have to uncomment a directive for those functions to return. So by default the line is commented so you should no longer run into this issue. Platformio has been updated with the latest versions of Simple Vector and Hashtable.
Hierarchy: Unordered Map (DEPENDS ON->) Hashtable (DEPENDS ON->) SimpleVector [PROBLEM CHILD] (In this case)
Arduino Library and github will be updated shortly.
Thank You!
Luca
Bug Report: Compilation Error with UnorderedMap in SimpleVector Library
Summary: I am encountering compilation errors specifically related to the usage of UnorderedMap within the SimpleVector library. This prevents me from successfully compiling my Arduino project, where I intend to utilize UnorderedMap.
Description: When including the SimpleVector library (SimpleVector.h) in my Arduino project and attempting to use UnorderedMap, the compilation fails with errors related to template syntax and primary expressions. Specifically, the errors seem to be around the initialization and usage of UnorderedMap instances.
Steps to Reproduce:
Expected Behavior: The library should allow for the successful compilation and usage of UnorderedMap as described in its documentation, without encountering template syntax errors.
Actual Behavior: Compilation fails with errors indicating problems with template parameter handling and initialization of UnorderedMap, as detailed in the attached compiler output.
Environment:
PlatformIO IDE @ 3.3.3 PlatformIO @ 6.1.15 VSCode @ 1.90.0 Target Board: ESP32 (ESP32 Dev Module) Compiler: toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5 Unordered Map LibraryVersion: @ 1.0.4 SimpleVector Library Version: @ 1.0.7-BETA
Additional Information: I have ensured that all PlatformIO packages and dependencies are up-to-date. I reviewed the SimpleVector library documentation but did not find specific instructions addressing compatibility issues with UnorderedMap on the ESP32 platform or the mentioned compiler version.
Attachments:
Compiler output log highlighting the errors encountered during compilation.
I would appreciate your guidance or any updates regarding this issue with UnorderedMap. Please let me know if there are any workarounds or updates planned to address this compatibility issue.
Thank you for your attention to this matter.
Best regards,
Luca
Attachments:
Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html PLATFORM: Espressif 32 (6.6.0) > Espressif ESP32 Dev Module HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES: