Merge pull request #72 from cppalliance/docs

Add namespaces to docs
This commit is contained in:
Matt Borland
2023-08-16 08:02:36 -04:00
committed by GitHub
4 changed files with 16 additions and 0 deletions

View File

@@ -9,6 +9,8 @@ This library is not an official boost library, and is under active development.
Charconv is a collection of parsing functions that are locale-independent, non-allocating, and non-throwing.
````
namespace boost { namespace charconv {
enum class chars_format : unsigned
{
scientific = 1 << 0,
@@ -51,6 +53,8 @@ BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars<bool>(char* first, char* last,
template <typename Real>
to_chars_result to_chars(char* first, char* last, Real value, chars_format fmt = chars_format::general, int precision) noexcept;
}} // Namespace boost::charconv
````
## Notes

View File

@@ -10,6 +10,8 @@ https://www.boost.org/LICENSE_1_0.txt
== chars_format overview
[source, c++]
----
namespace boost { namespace charconv {
enum class chars_format : unsigned
{
scientific = 1 << 0,
@@ -17,6 +19,8 @@ enum class chars_format : unsigned
hex = 1 << 2,
general = fixed | scientific
};
}} // Namespace boost::charconv
----
`boost::charconv::chars_format` is used to specify the format of floating point types with `from_chars` and `to_chars`.

View File

@@ -10,6 +10,8 @@ https://www.boost.org/LICENSE_1_0.txt
== from_chars overview
[source, c++]
----
namespace boost { namespace charconv {
struct from_chars_result
{
const char* ptr;
@@ -26,6 +28,8 @@ BOOST_CXX14_CONSTEXPR from_chars_result from_chars<bool>(const char* first, cons
template <typename Real>
from_chars_result from_chars(const char* first, const char* last, Real& value, chars_format fmt = chars_format::general) noexcept;
}} // Namespace boost::charconv
----
== from_chars_result

View File

@@ -10,6 +10,8 @@ https://www.boost.org/LICENSE_1_0.txt
== to_chars overview
[source, c++]
----
namespace boost { namespace charconv {
struct to_chars_result
{
char* ptr;
@@ -27,6 +29,8 @@ BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars<bool>(char* first, char* last,
template <typename Real>
to_chars_result to_chars(char* first, char* last, Real value, chars_format fmt = chars_format::general, int precision) noexcept;
}} // Namespace boost::charconv
----
== to_chars_result