[GH-ISSUE #353] "operator" is a registered word. Please don't use it as parameter name. #281

Closed
opened 2026-05-05 12:05:50 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @toge on GitHub (Aug 9, 2021).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/353

Originally assigned to: @jmcnamara on GitHub.

In 1.1.2, worksheet_filter_column2 has a parameter named operator.
Since operator is a C++ registered word, g++ will report this as a syntax error.
Can you please fix it?

include/xlsxwriter/worksheet.h:3725:67: Error: expected ‘)’ before ‘operator’
 3725 |                                    lxw_filter_rule *rule2, uint8_t operator);
      |                                                                   ^~~~~~~~~
      |                                                                   )
Originally created by @toge on GitHub (Aug 9, 2021). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/353 Originally assigned to: @jmcnamara on GitHub. In 1.1.2, `worksheet_filter_column2` has a parameter named `operator`. Since `operator` is a C++ registered word, g++ will report this as a syntax error. Can you please fix it? ``` include/xlsxwriter/worksheet.h:3725:67: Error: expected ‘)’ before ‘operator’ 3725 | lxw_filter_rule *rule2, uint8_t operator); | ^~~~~~~~~ | ) ```
gitea-mirror 2026-05-05 12:05:50 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jmcnamara commented on GitHub (Aug 9, 2021):

Thanks.

I've pushed a fix to main, if you can test it.

P.S., how did you compile with c++/g++ to find this issue?

<!-- gh-comment-id:895431370 --> @jmcnamara commented on GitHub (Aug 9, 2021): Thanks. I've pushed a fix to main, if you can test it. P.S., how did you compile with c++/g++ to find this issue?
Author
Owner

@jmcnamara commented on GitHub (Aug 9, 2021):

Fixed in version 1.1.3.

<!-- gh-comment-id:895503978 --> @jmcnamara commented on GitHub (Aug 9, 2021): Fixed in version 1.1.3.
Author
Owner

@toge commented on GitHub (Aug 9, 2021):

Thanks for the quick fix.
I have confirmed that 1.1.3 can be compiled.

I found this problem with gcc 11.2.1 on Fedora34.

<!-- gh-comment-id:895620007 --> @toge commented on GitHub (Aug 9, 2021): Thanks for the quick fix. I have confirmed that 1.1.3 can be compiled. I found this problem with gcc 11.2.1 on Fedora34.
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#281
No description provided.