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
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
34ef5c45be
Remove an unused dependency on Boost.StaticAssert
...
This closes issue #73 .
2025-10-22 19:06:12 +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
Arthur O'Dwyer
37a557d937
Make static_string trivially copyable
2025-10-03 18:42:10 +02:00
Krystian Stasiowski
42bb99ed25
support platforms without wchar_t
...
closes #51
2023-10-24 14:22:30 -04:00
Krystian Stasiowski
175f467a03
select hash implementation with macros based on word size
...
fixes #46
2023-05-29 11:30:18 -04:00
Krystian Stasiowski
6275cd7fe3
disable string_view overloads when type is convertible to basic_static_string
...
fixes #47
2023-05-29 10:51:06 -04:00
alandefreitas
ac84c4f40e
string_view interoperability
...
fix #26
2023-01-19 19:57:32 -03:00
alandefreitas
269987446e
check for char8_t directly
...
fix #40
2023-01-18 22:10:36 -03:00
alandefreitas
82ff4e0679
static_string<0> does not memcpy
...
fix #41
2023-01-18 22:09:45 -03:00
alandefreitas
0c914ff05b
fix noexcept-type warning
2022-11-04 10:34:09 -07:00
alandefreitas
bfce6eea90
fix unused-function warning
2022-11-03 22:48:35 -07:00
alandefreitas
ffce33d483
fix array-bounds warning
2022-11-03 14:12:02 -07:00
alandefreitas
c4f6491537
fix restrict warning
2022-11-02 15:46:33 -07:00
sdarwin
7822f1b991
update CI
...
fix #31 , fix #20
2022-10-31 16:09:33 -07:00
Glen Fernandes
5d6fefdd2a
Protect against MSVC min and max macros
2022-04-16 11:49:23 -04:00
m-peko
c5df271a1a
Remove trailing spaces
2021-10-25 07:27:47 -04:00
m-peko
3a1efd2078
Implement erase_if function and related tests
2021-01-18 15:59:20 -05:00
Krystian Stasiowski
d524755ec0
Remove cv-qualifiers from character type deduced by deduction guide
2020-06-08 15:33:10 -04:00
Krystian Stasiowski
8fe9325d6d
Whitespace fix
2020-04-06 17:57:57 -04:00
Krystian Stasiowski
0b231586ed
Update meta, remove redundant exception check
2020-03-15 13:46:48 -04:00
Krystian Stasiowski
519758bd35
Improve inlineability of exception checks
2020-03-11 22:47:15 -04:00
Krystian Stasiowski
7b27ebea33
Genericize exception classes
2020-03-11 22:47:15 -04:00
Krystian Stasiowski
e7e54b2665
Fix throwing in constexpr and substr for gcc 5
2020-03-11 22:47:15 -04:00
Krystian Stasiowski
5934a28124
Fix operator+ for non-full arrays
2020-03-11 22:47:15 -04:00
Krystian Stasiowski
2584ab2400
Improve documentation
2020-03-02 22:25:12 -05:00
Krystian Stasiowski
d669692111
Change when ptr_in_range uses comparison functions
2020-03-02 19:37:11 -05:00
Krystian Stasiowski
7849cc023b
Update documentation
2020-03-02 19:29:31 -05:00
Krystian Stasiowski
5dafb09767
Fix doc build
2020-02-29 15:10:37 -05:00
Krystian Stasiowski
f92cc2ab98
Improve checks for attributes
2020-02-28 16:40:56 -05:00
Krystian Stasiowski
6c52e75a03
Guard deprecated code
2020-02-28 15:44:37 -05:00
Krystian Stasiowski
9d6b097c54
Ignore -Wformat-truncation
2020-02-28 15:33:36 -05:00
Krystian Stasiowski
12309e65e5
Fix static_u8string alias
2020-02-28 14:54:45 -05:00
Krystian Stasiowski
e28a70f281
Add external include guard
2020-02-28 14:52:07 -05:00
Krystian Stasiowski
18f89ef078
Consistent initialization style
2020-02-28 14:35:16 -05:00
Krystian Stasiowski
971b663df1
Remove more warnings in tests
2020-02-28 14:08:21 -05:00
Krystian Stasiowski
315a9fd087
Remove warnings from to_static_string
2020-02-27 17:29:35 -05:00
Krystian Stasiowski
bbbc8a6290
Strike more warnings
2020-02-27 16:22:54 -05:00
Krystian Stasiowski
73b829ebe5
Fix nodiscard checks
2020-02-27 15:55:43 -05:00
Krystian Stasiowski
54c5d7cef4
Remove some warnings in tests
2020-02-27 15:51:09 -05:00
Krystian Stasiowski
4a494ed9b5
Remove warnings
2020-02-27 11:20:41 -05:00
Krystian Stasiowski
f9e5f122ab
Add convenience header
2020-02-26 23:51:10 -05:00
Krystian Stasiowski
a3531c0e48
Fix macro definition in docs, update CI links and config.hpp
2020-02-26 23:04:38 -05:00
Krystian Stasiowski
f74d97d09e
Remove unused variable, fix comparison warning
2020-02-25 22:39:16 -05:00
Krystian Stasiowski
71c7f2af30
Small bug fix
2020-02-23 21:47:41 -05:00