forked from boostorg/static_string
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] develop from boostorg:develop #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pull
wants to merge
73
commits into
bazelboost:develop
Choose a base branch
from
boostorg:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
fix #24
…a source in install targets.
This closes issue #73.
…atic_wstring() for floating point values
C++26 specifies that std::to_string() and std::to_wstring() format floating point values as if using std::format(). This commit updates the internal conversion helpers to match that behavior, using std::format_to_n() for efficient, allocation-free formatting directly into the static_string/static_wstring buffer. Fallbacks using snprintf()/swprintf() remain active for pre-C++26 builds. This ensures consistent formatting across standard and Boost APIs.
The config.hpp uses `BOOST_LIBSTDCXX_VERSION` which isn't defined in standalone mode so `BOOST_STATIC_STRING_NO_CXX17_HDR_STRING_VIEW` will be defined. This then causes build failures for code expecting the availability of string_view.
`source_group(TREE` requires CMake 3.8
… C-style string in a constexpr context This triggers a libstdc++ issue which was fixed in GCC 12.4 and 13.3: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113200>. If our CI shows we bump into that bug, we'll add a workaround.
See the previous commit. This simple fix avoids calling Traits::move(), which is where the bug resides. This closes issue #55.
GCC 5-10 incorrectly complain about our nested classes being private. So, make them public.
…r one Reason: See the new code comment.
Reason: They have the same issue as GCC 9.
They were conditioned on detection of C++20 via __cplusplus, but Clang 10 and 11 don't support class types as NTTP, even though they report C++20 via __cplusplus when -std=c++20 is used.
The iterator-based insert(const_iterator, size_type, value_type)
function relies on traits_type::move() to shift the existing null
terminator to its new position. Clang 3.7's constexpr evaluator does not
handle this correctly, causing the following test to fail:
static_string<3>{"ab"}.insert(2, 1, 'c') == "abc"
Add an explicit term() call, guarded by a preprocessor conditional for
Clang 3.7, to ensure proper null termination.
This introduces an alternative to basic_static_string designed for use in POD types: Trivially copyable, having a sizeof == N + 1, with no embedded NULs. Placed in example/ to gather user feedback before committing to a public API. See issue #23.
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.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )