Repository navigation
THRIFT-6213: Define the TConfiguration default constants in the library - #3973
Merged
Merged
Conversation
slachiewicz
marked this pull request as ready for review
September 28, 2026 18:10
Member
Code reviewNo blocking issues found. Checked for bugs and CLAUDE.md compliance. One suggestion, below the bar for an issue but verified:
thrift/lib/cpp/src/thrift/TConfiguration.cpp Lines 24 to 29 in e20168f 🤖 Generated with Claude Code |
slachiewicz
force-pushed
the
THRIFT-6213
branch
from
October 26, 2026 20:12
e20168f to
d2f724f
Compare
Member
Author
|
The comment and the commit message now say the definition is needed in every standard for as long as the constants are |
Client: cpp An odr-used static const data member needs this out-of-line definition in every C++ standard; drop it only once the constants become inline constexpr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slachiewicz
force-pushed
the
THRIFT-6213
branch
from
October 28, 2026 01:56
d2f724f to
af16852
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
TConfiguration.cppwith out-of-line definitions ofDEFAULT_MAX_MESSAGE_SIZE,DEFAULT_MAX_FRAME_SIZEandDEFAULT_RECURSION_DEPTH, so binding one to a reference links before C++17. The new test takes each constant's address through avolatilepointer, which needs the definitions at any optimisation level; on master it fails to link even in a Release build.Verified: Ubuntu 24.04 arm64, GCC 13, C++11 — Debug build of UnitTests links and passes 141/141 (fails to link on master); TTransportFactoryConfigTest 11/11 in Debug and Release.