TartanLlama / expected

C++11/14/17 std::expected with functional-style extensions
https://tl.tartanllama.xyz
Creative Commons Zero v1.0 Universal
1.54k stars 133 forks source link

#ifdef guards for enabling/disabling extensions #112

Open LouisHLAV opened 2 years ago

LouisHLAV commented 2 years ago

Hi!

I'd love to use this library at work, but unfortunately we'd have to disable the usability extensions for future compatibility with the standard. The noext branch seems a bit behind master, so I'm wondering if it'd be okay to add the option to enable/disable those extensions at compile-time.

If that seems like a good idea, I'd be happy to submit a PR :smiley:

Cheers, and thank you for the amazing lib!

asmaloney commented 2 years ago

This would be convenient.

Use-case: if I include expected in the API of my library and want to switch it out later (if it is accepted as standard), I don't want to break my user's code if they have used these extensions...

(Alternatively, providing a parallel release which doesn't include them at all would be even better!)

Thank you!