[GH-ISSUE #300] Please don't use field name "delete". #240

Closed
opened 2026-05-05 12:00:56 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @toge on GitHub (Aug 4, 2020).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/300

Originally assigned to: @jmcnamara on GitHub.

"delete" is C++ reserved word.
So C++ compiler can't compile 0.9.6.

include/xlsxwriter/chart.h:815:13: error: expected unqualified-id before ‘delete’
  815 |     uint8_t delete;
      |             ^~~~~~
Originally created by @toge on GitHub (Aug 4, 2020). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/300 Originally assigned to: @jmcnamara on GitHub. "delete" is C++ reserved word. So C++ compiler can't compile 0.9.6. ``` include/xlsxwriter/chart.h:815:13: error: expected unqualified-id before ‘delete’ 815 | uint8_t delete; | ^~~~~~ ```
gitea-mirror 2026-05-05 12:00:56 -06:00
Author
Owner

@jmcnamara commented on GitHub (Aug 4, 2020):

Ouch. That shows how long it has been since I've written any C++ and also why Doxygen has colorising that word. :-(

I'll change it to hide or similar.

I should also add a C++ compilation test. I usually don't bother due to all the alloc warnings/errors.

Anyone have any suggestions on how to add a C++ compilation that will catch errors?

<!-- gh-comment-id:668453706 --> @jmcnamara commented on GitHub (Aug 4, 2020): Ouch. That shows how long it has been since I've written any C++ and also why Doxygen has colorising that word. :-( I'll change it to `hide` or similar. I should also add a C++ compilation test. I usually don't bother due to all the alloc warnings/errors. Anyone have any suggestions on how to add a C++ compilation that will catch errors?
Author
Owner

@jmcnamara commented on GitHub (Aug 4, 2020):

Fixed in version 0.9.7.

Let me know how you are compiling this with C++ so I can try avoid issues like this in future. Thanks.

<!-- gh-comment-id:668527450 --> @jmcnamara commented on GitHub (Aug 4, 2020): Fixed in version 0.9.7. Let me know how you are compiling this with C++ so I can try avoid issues like this in future. Thanks.
Author
Owner

@toge commented on GitHub (Aug 4, 2020):

Thank you for your quick response!
Now I can compile 0.9.7, and every code work fine!

I usually compile C++ code with g++ -std=c++17 -Wall -Wextra -pedantic.
g++ 10.2.0 can work fine with your library without any warning messages.

<!-- gh-comment-id:668666654 --> @toge commented on GitHub (Aug 4, 2020): Thank you for your quick response! Now I can compile 0.9.7, and every code work fine! I usually compile C++ code with `g++ -std=c++17 -Wall -Wextra -pedantic`. g++ 10.2.0 can work fine with your library without any warning messages.
Author
Owner

@jmcnamara commented on GitHub (Aug 4, 2020):

I usually compile C++ code with g++ -std=c++17 -Wall -Wextra -pedantic.

How exactly are you compiling. I can't get minizip to compile with those options. If I compile minizip separately I can compile everything else, but with a lot of warnings:

$ CFLAGS="-std=c++17 -Wall -Wextra -pedantic -fpermissive" make V=1 CC=g++-9
<!-- gh-comment-id:668724489 --> @jmcnamara commented on GitHub (Aug 4, 2020): > I usually compile C++ code with `g++ -std=c++17 -Wall -Wextra -pedantic`. How exactly are you compiling. I can't get minizip to compile with those options. If I compile minizip separately I can compile everything else, but with a lot of warnings: ``` $ CFLAGS="-std=c++17 -Wall -Wextra -pedantic -fpermissive" make V=1 CC=g++-9 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#240
No description provided.