[ 
https://issues.apache.org/jira/browse/THRIFT-5603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylwester Lachiewicz resolved THRIFT-5603.
------------------------------------------
    Fix Version/s: 0.22.0
       Resolution: Fixed

Resolving. {{operator==}} and {{operator!=}} are both defined on 
{{TEnumIterator}} in {{lib/cpp/src/thrift/Thrift.h}}, so {{-D_GLIBCXX_DEBUG}} 
builds have the comparison that {{std::__debug::map}} needs when constructing 
from an iterator pair.

The fix is {{4f06d5eec}} "add operator == for TEnumIterator" (PR #2633), first 
released in 0.22.0. The commit subject does not name this ticket, which is why 
it never showed up as linked work here.

_This comment was created with AI assistance._

> Lack of operator == in TEnumIterator
> ------------------------------------
>
>                 Key: THRIFT-5603
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5603
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>            Reporter: africamonkey
>            Priority: Major
>             Fix For: 0.22.0
>
>         Attachments: error_log.txt
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> We want to enable the compile option `-D_GLIBCXX_DEBUG` to find potential 
> bugs, but we meet compile errors: [^error_log.txt]
> Let's see the code in apache arrow project: 
> [https://github.com/apache/arrow/blob/984b59a2b4edb03479947c46007fc6142447f759/cpp/src/generated/parquet_types.cpp#L36]
> It constructs a std::map from a pair of iterators. However, in the debug mode 
> of std::map (say, std::__debug::map), it will add additional check (such as 
> boundary check) and need an operator == for these iterators.
> So, I want to add an operator ==. 
> Pull request: https://github.com/apache/thrift/pull/2633



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to