Glimesh / janus-ftl-plugin

A plugin for the Janus WebRTC gateway to enable relaying of audio/video streams utilizing Mixer's FTL (Faster-Than-Light) protocol.
https://hayden.fyi/posts/2020-08-03-Faster-Than-Light-protocol-engineering-notes.html
GNU Affero General Public License v3.0
46 stars 11 forks source link

Replace `Result` with `std::expected` #123

Open danstiner opened 3 years ago

danstiner commented 3 years ago

The Result type has served us well but as Hayden pointed out it would be nice to have an error code instead of just a message string.

Rather than extend Result I'd suggest moving to std::expected. It didn't quite make the C++20 standard but the feature is basically ready and there is a nice and popular compat library we can use until the next standard comes out: https://github.com/TartanLlama/expected