Commit Graph

317 Commits

Author SHA1 Message Date
Gennaro Prota
4dcfb39494 Replace the implementation of cxper_char_traits::move() with a simpler one
Reason: See the new code comment.
2025-12-19 18:23:33 +01:00
Gennaro Prota
4bf6461ca1 Work around a bug in GCC 5-10
GCC 5-10 incorrectly complain about our nested classes being private.
So, make them public.
2025-12-19 18:23:33 +01:00
Krystian Stasiowski
67efdf6a9b Make basic_static_string usable as a NTTP 2025-12-19 18:23:33 +01:00
Krystian Stasiowski
3a410b8472 Add build directory and CMake preset files to .gitignore 2025-12-19 18:23:33 +01:00
Gennaro Prota
bf988466f8 Work around GCC (libstdc++) bug #113200
See the previous commit. This simple fix avoids calling Traits::move(),
which is where the bug resides.

This closes issue #55.
2025-12-16 10:30:33 +01:00
Gennaro Prota
a526ebd1f6 Check that basic_static_string can be constructed and assigned from a 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.
2025-12-16 10:30:33 +01:00
Gennaro Prota
2f8c7a69ea Update the library metadata: Remove Krystian, add myself as a maintainer 2025-12-15 14:25:26 +01:00
Gennaro Prota
c915934529 Fix four occorrences of a typo ("arugment") in the Javadoc comments boost-1.90.0 2025-11-14 12:03:00 +01:00
Gennaro Prota
10b5491104 Avoid two C4244 warnings from MSVC 2025-11-05 11:30:41 +01:00
Alexander Grund
a58319dbdd Switch boost.io to boost.org boost-1.90.0.beta1 2025-10-24 11:59:10 +02:00
Alexander Grund
4c84b61975 README: Replace travis badges by GHA badges 2025-10-24 11:59:10 +02:00
Alexander Grund
fbd6051165 Update Link to regression test matrix in README 2025-10-24 11:59:10 +02:00
Alexander Grund
db1ea76a17 Fix required CMake version
`source_group(TREE` requires CMake 3.8
2025-10-24 11:58:47 +02:00
Alexander Grund
ee172b86fd Try standalone only with >=C++17 2025-10-24 11:57:55 +02:00
Alexander Grund
bd3dd01259 Update Drone from Boost.CI 2025-10-24 11:57:55 +02:00
Gennaro Prota
a841869405 Remove a use of std::strcpy() to avoid a C4996 warning from MSVC 2025-10-24 11:00:21 +02:00
Alexander Grund
3613e9578d Fix standalone build with Clang
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.
2025-10-24 10:11:37 +02:00
Alexander Grund
6f17b60377 Guard test requiring string_view 2025-10-24 10:11:37 +02:00
Gennaro Prota
815678e1e7 CI: Test C++26/2c again 2025-10-23 16:49:48 +02:00
Gennaro Prota
2cc22bf5a8 Align to_static_[w]string() with C++26 std::to_[w]string()
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.
2025-10-23 16:49:48 +02:00
Gennaro Prota
d6f976a7df Fix the sizes of the strings returned by to_static_string() and to_static_wstring() for floating point values 2025-10-23 16:49:48 +02:00
Gennaro Prota
7b564d8d26 Fix two macro names in the unit tests 2025-10-22 19:18:39 +02:00
Gennaro Prota
3c37deed99 Fix the previous commit 2025-10-22 19:11:09 +02:00
Gennaro Prota
34ef5c45be Remove an unused dependency on Boost.StaticAssert
This closes issue #73.
2025-10-22 19:06:12 +02:00
Kenneth Reitz
0f34644488 Update libraries.json /s/container/containers
The other libraries reference "containers" instead of "container"
2025-10-22 18:48:18 +02:00
Dmitry Arkhipov
4c27826548 use Python version of Docca 2025-10-22 18:35:38 +02:00
Gennaro Prota
9c5d69475d Implement the arithmetic conversions in terms of resize_and_overwrite()
Reason: Performing the conversions without accessing private members,
providing a model for users to implement their own with comparable
efficiency.
2025-10-09 17:45:16 +02:00
Gennaro Prota
300781d954 Add a resize_and_overwrite() member
Reason: This is in preparation of the next commit. See its commit
message.
2025-10-09 17:45:16 +02:00
Gennaro Prota
cd1a1a41c3 Don't use an additional buffer in the arithmetic conversions
In the case of the floating point conversions, this effectively avoids a
copy of the buffer contents. In the case of the integer conversions, it
doesn't eliminate the copy, but still removes the extra buffer.

This fixes issue #65.
2025-10-09 17:45:16 +02:00
Alexander Grund
0d255f7438 Appveyor: Update MinGW 32bit job
Use the variant from Boost.CI

Fixes #68
2025-10-07 10:19:31 +02:00
Alexander Grund
17d77ef5bb Disable multi-arch CI job 2025-10-06 17:22:47 +02:00
Alexander Grund
20afd07676 Pass char arrays instead of static_string instances to testR
Avoid stack overflow in MSVC caused by huge amount of static_string instances

Fixes #70
2025-10-06 17:22:47 +02:00
Alexander Grund
7f903ef7ce Add cxx11_hdr_type_traits B2 requirement
Avoid failures with GCC < 5
2025-10-06 17:22:47 +02:00
Alexander Grund
5dfbb1f2b1 CI: Disable coverage and coverity jobs 2025-10-06 17:22:47 +02:00
Arthur O'Dwyer
37a557d937 Make static_string trivially copyable 2025-10-03 18:42:10 +02:00
Alexander Grund
cd546285c4 CI: Don't test C++26/2c 2025-10-03 12:12:05 +02:00
Alexander Grund
645bf0a27d Simplify testTS
Replace boolean by check for defaulted nullptr
2025-10-03 12:12:05 +02:00
Alexander Grund
5067dfce5f Use BOOST_TEST_EQ for to_static_string tests using floating point values 2025-10-03 12:12:05 +02:00
Alexander Grund
d37197d773 Add CMake subdir test for CI 2025-10-03 12:12:05 +02:00
Alexander Grund
a421cf742c Switch to reusable GHA workflow
Avoid the current failures due to outdated CI configs
2025-10-03 12:12:05 +02:00
Rene Rivera
7a53b7ff20 Move include to target. 2025-05-02 19:21:11 +03:00
Rene Rivera
24d62635a3 Put back whitespace. 2025-05-02 19:21:11 +03:00
Rene Rivera
a8f671ea1e Attempt to fix GHA. 2025-05-02 19:21:11 +03:00
Rene Rivera
d677c9436c Update build deps. 2025-05-02 19:21:11 +03:00
Rene Rivera
a3cc7bcf95 Move inter-lib dependencies to a project variable and into the build targets. 2025-05-02 19:21:11 +03:00
Rene Rivera
70578731e7 Update copyright dates. 2025-05-02 19:21:11 +03:00
Rene Rivera
3fb22ed769 Bump B2 require to 5.2 2025-05-02 19:21:11 +03:00
Rene Rivera
32824bfa1d Add requires-b2 check to top-level build file. 2025-05-02 19:21:11 +03:00
Rene Rivera
f15a4d0586 Add missing import-search for cconfig/predef checks. 2025-05-02 19:21:11 +03:00
Rene Rivera
cd5bc51e9e Replace relative docca refs with project based. 2025-05-02 19:21:11 +03:00