File: conversion_result.md

package info (click to toggle)
jsoncons 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,276 kB
  • sloc: cpp: 143,266; sh: 34; makefile: 8
file content (44 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
### jsoncons::conversion_result

```cpp
#include <jsoncons/conversion_result.hpp>


template <typename T> 
using conversion_result = jsoncons::expected<T,conversion_error>;
```

#### Member types

Member type                         |Definition
------------------------------------|------------------------------
`value_type`|`T`
`error_type`|[conversion_error](conversion_error.md)

#### Accessors  

    constexpr const T* operator->() const noexcept;  
    constexpr T* operator->() noexcept;  
    constexpr const T& operator*() const & noexcept;  
    constexpr T& operator*() & noexcept;  
    constexpr const T&& operator*() const && noexcept;  
    constexpr T&& operator*() && noexcept;  
Accesses the expected value

    constexpr operator bool() const noexcept;  
    constexpr bool has_value() const noexcept;  
Checks whether the result contains an expected value

    constexpr T& value() &;  
    constexpr const T& value() const &;  
    constexpr T&& value() &&;  
    constexpr const T&& value() const &&;  
Returns the expected value

    constexpr conversion_error& error() & noexcept;  
    constexpr const conversion_error& error() const & noexcept;  
    constexpr conversion_error&& error() && noexcept;  
    constexpr const conversion_error&& error() const && noexcept;  
Returns the unexpected value [conversion_error](conversion_error.md)