Gennaro Prota 62ed5ee17a Fix basic_static_cstring::compare(const CharT*) for over-long inputs
compare(const CharT* s) constructed a temporary basic_static_cstring<N>
from s and delegated to the class-type overload. The constructor throws
std::length_error when traits::length(s) > N, and because compare() is
noexcept, the throw led to std::terminate():

  static_cstring<3> s("abc");
  s.compare("abcd");              // terminate() via noexcept throw

The free operator==() / operator!=() overloads for const CharT*, which
delegate to compare(), had the same flaw.
2026-04-21 16:13:29 +02:00
2025-10-24 11:57:55 +02:00
2025-10-22 18:35:38 +02:00
2025-12-19 18:26:40 +01:00
2020-04-18 14:09:20 -04:00
2025-10-07 10:19:31 +02:00
2022-10-31 16:09:33 -07:00
2025-10-24 11:57:55 +02:00
2019-09-13 06:29:15 -07:00
2025-10-22 19:11:09 +02:00
2019-09-13 06:29:15 -07:00
2025-10-24 11:58:47 +02:00
2020-03-02 19:29:31 -05:00
2019-09-13 06:29:15 -07:00
2025-10-24 11:59:10 +02:00

Boost.StaticString

Branch GHA CI Appveyor Azure Pipelines codecov.io Docs Matrix
master Build Status Build status Build Status codecov Documentation Matrix
develop Build Status Build status Build Status codecov Documentation Matrix

Introduction

This library provides a dynamically resizable string of characters with compile-time fixed capacity and contiguous embedded storage in which the characters are placed within the string object itself. Its API closely resembles that of std::string.

Documentation

License

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

S
Description
A fixed capacity dynamically sized string
Readme
1.4 MiB
Languages
C++ 98.5%
CMake 0.9%
Shell 0.5%
HTML 0.1%