You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
target_link_libraries(your_project PRIVATE reflectcpp) # Link against the library
85
93
```
86
94
95
+
87
96
### Troubleshooting vcpkg
88
97
89
98
vcpkg is a great, but very ambitious and complex project (just like C++ is a great, but very ambitious and complex language). Here are some of the you might run into and how to resolve them:
`r1.and_other(r2)` expects an `r2` or type `rfl::Result<U>`. It returns an error, if `r1` contains an error and `r2` otherwise.
140
+
## `.or_else(...)`, `.transform_error(...)`
140
141
141
142
`r.or_else(f)` expects a function `f` for type `Error -> rfl::Result<T>`. It returns `r` if `r` did not contain an error and the results of `f` otherwise.
142
143
144
+
`r.transform_error(f)` expects a function `f` for type `Error -> Error`.
145
+
143
146
This is often used to produce better error messages:
0 commit comments