Skip to content

Commit 8e60521

Browse files
committed
Doc
1 parent 76e6f92 commit 8e60521

File tree

4 files changed

+106
-4
lines changed

4 files changed

+106
-4
lines changed

doc/ref/corelib/conversion_error.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### jsoncons::conversion_error
2+
3+
```cpp
4+
#include <jsoncons/conversion_result.hpp>
5+
```
6+
7+
class conversion_error;
8+
```
9+
10+
#### Accessors
11+
12+
std::error_code code() const noexcept;
13+
Returns an error code.
14+
15+
const std::string& message_arg() const noexcept
16+
Returns an explanatory string
17+
18+
#### Non-member functions
19+
20+
std::string to_string(const read_error& err);
21+
22+
std::ostream& operator<<(std::ostream& os, const read_error& err);
23+
24+

doc/ref/corelib/conversion_result.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
### jsoncons::conversion_result
2+
3+
```cpp
4+
#include <jsoncons/conversion_result.hpp>
5+
```
6+
7+
template <
8+
typename T
9+
> class conversion_result
10+
```
11+
12+
#### Accessors
13+
14+
constexpr const T* operator->() const noexcept;
15+
16+
constexpr T* operator->() noexcept;
17+
18+
constexpr const T& operator*() const & noexcept;
19+
20+
constexpr T& operator*() & noexcept;
21+
22+
constexpr const T&& operator*() const && noexcept;
23+
24+
constexpr T&& operator*() && noexcept;
25+
26+
constexpr operator bool() const noexcept;
27+
28+
constexpr bool has_value() const noexcept;
29+
30+
constexpr T& value() &;
31+
32+
constexpr const T& value() const &;
33+
34+
constexpr T&& value() &&;
35+
36+
constexpr const T&& value() const &&;
37+
38+
constexpr conversion_error& error() & noexcept;
39+
40+
constexpr const conversion_error& error() const & noexcept;
41+
42+
constexpr conversion_error&& error() && noexcept;
43+
44+
constexpr const conversion_error&& error() const && noexcept;
45+
46+

doc/ref/corelib/read_error.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### jsoncons::read_error
2+
3+
```cpp
4+
#include <jsoncons/read_result.hpp>
5+
```
6+
7+
class read_error;
8+
```
9+
10+
#### Accessors
11+
12+
std::error_code code() const noexcept;
13+
Returns an error code.
14+
15+
const std::string& message_arg() const noexcept
16+
Returns an explanatory string
17+
18+
std::size_t line() const noexcept
19+
Returns the line number to the end of the text where the exception occurred.
20+
Line numbers start at 1.
21+
22+
std::size_t column() const noexcept
23+
Returns the column number to the end of the text where the exception occurred.
24+
Column numbers start at 1.
25+
26+
#### Non-member functions
27+
28+
std::string to_string(const read_error& err);
29+
30+
std::ostream& operator<<(std::ostream& os, const read_error& err);
31+
32+

include/jsoncons/read_result.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ class read_error
4040

4141
read_error& operator=(read_error&& other) = default;
4242

43-
const std::error_code& code() const
43+
const std::error_code& code() const noexcept
4444
{
4545
return ec_;
4646
}
47-
const std::string& message_arg() const
47+
const std::string& message_arg() const noexcept
4848
{
4949
return message_arg_;
5050
}
51-
std::size_t line() const
51+
std::size_t line() const noexcept
5252
{
5353
return line_;
5454
}
55-
std::size_t column() const
55+
std::size_t column() const noexcept
5656
{
5757
return column_;
5858
}

0 commit comments

Comments
 (0)