Skip to content

Commit b92f119

Browse files
committed
Add new interfaces to the docs
1 parent a51aa7f commit b92f119

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

doc/decimal/charconv.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ namespace decimal {
8888
template <typename DecimalType>
8989
constexpr boost::decimal::from_chars_result from_chars(const char* first, const char* last, DecimalType& value, boost::decimal::chars_format fmt = boost::decimal::chars_format::general) noexcept
9090
91+
#ifdef BOOST_DECIMAL_HAS_STD_STRING_VIEW
92+
93+
template <typename DecimalType>
94+
constexpr boost::decimal::from_chars_result from_chars(std::string_view str, DecimalType& value, boost::decimal::chars_format fmt = boost::decimal::chars_format::general) noexcept
95+
96+
#else
97+
98+
template <typename DecimalType>
99+
constexpr boost::decimal::from_chars_result from_chars(const std::string& str, DecimalType& value, boost::decimal::chars_format fmt = boost::decimal::chars_format::general) noexcept
100+
101+
#endif
102+
91103
#ifdef BOOST_DECIMAL_HAS_STD_CHARCONV
92104
93105
template <typename DecimalType>

doc/decimal/config.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ This flag increases the performance of the basis operations (e.g. add, sub, mul,
4646
- `BOOST_DECIMAL_HAS_STD_CHARCONV`: This macro is defined if header `<charconv>` exists and the language standard used is >= C++17
4747
* We only need the structs and enums out of the header so we are not concerned with being overly restrictive about the feature test macros.
4848
** Known compilers that support this lighter requirement are: GCC >= 10, Clang >= 13, and MSVC >= 14.2
49+
50+
- `BOOST_DECIMAL_HAS_STD_STRING_VIEW`: This macro is defined if header `<string_view>` exists and the langauge standard used is >= C++17

0 commit comments

Comments
 (0)