boostorg / system

Boost.org system module
http://boost.org/libs/system
36 stars 85 forks source link

`r & f` doesn't work when `r` is `result<void>` #117

Closed pdimov closed 7 months ago

pdimov commented 7 months ago

Should accept a nullary f.

pdimov commented 7 months ago

Actually, for result<void>, maybe r & v should also work.

pdimov commented 7 months ago

r & v would be ambiguous with r & f, because it's unconstrained; any v works and produces result<V>. Won't be provided for now.

pdimov commented 7 months ago

Now r = r & f; works for result<void>, but r &= f; does not. It's not a very useful operation, but should probably work for consistency reasons.