mirror of
https://github.com/boostorg/lexical_cast.git
synced 2026-07-21 13:23:34 +00:00
8fc8a19931c8cb452400af907959fdacbbdd8ec1
This allows to workaround the following error when using clang >= 21 on the following code:
```
#include <string>
#include <iostream>
#include "boost/lexical_cast.hpp"
enum SomeEnum
{
OneValue
};
int main()
{
std::cout << boost::lexical_cast<std::string>(SomeEnum::OneValue) << std::endl;
}
```
Results in:
```
/app/boost/include/boost/type_traits/is_signed.hpp:37:25: error: in-class initializer for static data member is not a constant expression
37 | static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
... (snapped)
/app/boost/include/boost/type_traits/is_signed.hpp:37:38: note: integer value -1 is outside the valid range of values [0, 1] for the enumeration type 'SomeEnum'
37 | static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
```
Boost.LexicalCast
Boost.LexicalCast is one of the Boost C++ Libraries. This library is meant for general literal text conversions, such as an int represented a string, or vice-versa.
Test results
| @ | Build | Tests coverage | More info |
|---|---|---|---|
| Develop branch: | ![]() |
details... | |
| Master branch: | ![]() |
details... |
Latest developer documentation
License
Distributed under the Boost Software License, Version 1.0.
Description
Languages
C++
97.8%
CMake
2.1%
HTML
0.1%

