TartanLlama / expected

C++11/14/17 std::expected with functional-style extensions

Home Page:https://tl.tartanllama.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reference support?

higaski opened this issue Β· comments

Hey Sy

I was wondering if there will be reference support for tl::expected at some point in the future? I've just checked out the latest draft p0323r8 for std::expected and although I'd already expected ( 😁 sorry ) it std::expected is going to be consistent with std::optional and therefor not allow references.

Your tl::optional implementation on the other hand does allow references and even explicitly says so in the description. Is there any particular reason why you'd want support for one type but not the other?

Best regards
Vincent

Hello Simon,

what actually is the reason for not supporting references in the std::expected proposal? I didn't know tl::optional has reference support, but i also would be interested into reference support of tl::expected. I am just curious.

Kind regards,
Daniel