[
https://issues.apache.org/jira/browse/THRIFT-4680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16723358#comment-16723358
]
Sebastian Stüker commented on THRIFT-4680:
------------------------------------------
Hello James,
I hit the create button too fast, before actually adding the description.
I just added the description, describing possible work arounds, and only in
principal, how to do it correctly.
I won't be able to create a pull request tonight (end of my day right now), but
a colleague of me and I might be able to put a small thing together tomorrow
during our business day.
Would that be O.K.?
(BTW, has nobody else encountered the problem so far? A search of the issue
database did not show anything, and I did not find the feature for searching
the mailing list right away).
Best
Sebastian
> TBufferTransports.h does not compile under Windows 10
> -----------------------------------------------------
>
> Key: THRIFT-4680
> URL: https://issues.apache.org/jira/browse/THRIFT-4680
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.11.0
> Reporter: Sebastian Stüker
> Assignee: James E. King III
> Priority: Critical
>
> When compiling under Windows 10 and including TBufferTransports.h,
> compilation fails with
> Error C2589 '(': illegal token on right side of '::' (compiling source
> file [...])
> [...]\thrift-0.11.0\lib\cpp\src\thrift\transport\tbuffertransports.h 452
> The error seems to be caused by the fact that in windows.h a macro max is
> defined.
> Possible work arounds are to defino NOMINMAX in order to prevent windows.h to
> defin the macro max.
> Alternatively before the statement on line 452, to undefine the macro
> {{#undef max }}
> {{maxBufferSize_ = std::numeric_limits<uint32_t>::max();}}{{ }}
> However, I would prefer a version, where it is checked whether max is defined
> as a macro, and if so, to use the other, correct syntax for this case of:
> {{maxBufferSize_ = (std::numeric_limits<uint32_t>::max)();}}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)