Comments (4)
Why would we like it to be a valid code?
from expected.
Because the fact that exception_ptr needs a specific factory is already hidden on the expected_traits. In particular the following works as expected accept an unexpected_type implicitly,
expected<string> e = make_unexpected(1);
and the following works because there is an explicit constructor from cont char* to string
expected<int, string> e = {unexpect, "A"};
from expected.
I think it's an issue of exception_ptr
itself and not expected.
from expected.
Ok, closed as invalid.
from expected.
Related Issues (20)
- [Monads] fix renaming from vale_category to valued_category HOT 1
- [Monads] xxx_category specializations seems not needed when there is no category deduction. HOT 1
- Add un operator||()/catch_exception HOT 1
- Shouldn't all the unexpected values of expected<E,T> compare equal? HOT 2
- Define a common visitation interface for any, variant<E1, ..., En>, exception_ptr
- Add PossibleValued equal operation.
- [monads] Add a Rebindable type_constructor meta-function
- implement rebind by default depending on type_constructor and apply HOT 1
- possible bug (clang 3.6) HOT 15
- Readme: Expected /has/ been proposed: N4109 (N4015). HOT 1
- Printing the what message of an exception HOT 4
- [GCC] invalid initialization of non-const reference of type 'int&' HOT 5
- MSVC2013: linker error LNK2005 - "only_set_valid" already defined HOT 2
- REQUIRES macro should be in boost namespace HOT 1
- Warnings in unexpected value HOT 1
- Why doesn't `expected<void, E>` have `map` and `catch_error` HOT 2
- Would be nice if we could have an rvalue-specialized `catch_error()` HOT 1
- Why does `error_type` need to be default constructible? HOT 3
- `expected<void, E>` doesn't have an unwrapping overload in `bind`, effectively making `bind` equivalent to map HOT 4
- Shouldn't the default `error_traits::make_error` copy in the argument? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expected.