@nodeluna@programming.dev to C++@programming.devEnglish • edit-27 days agoa small implementation for std::expected for C++11github.comexternal-linkmessage-square8fedilinkarrow-up114arrow-down10file-text
arrow-up114arrow-down1external-linka small implementation for std::expected for C++11github.com@nodeluna@programming.dev to C++@programming.devEnglish • edit-27 days agomessage-square8fedilinkfile-text
minus-square@nodeluna@programming.devOPlinkfedilinkEnglish1•8 days agowhat don’t u get it? why did I make this? or what is the point of this type? if you are unfamiliar with std::expected then check out https://en.cppreference.com/w/cpp/utility/expected.html it’s basically a type that let you return either a “value” or an “error” and the caller of the function has to check which did the function return. it’s a modern way of handling errors in C++ that was introduced in C++23
I dont get it?
what don’t u get it? why did I make this? or what is the point of this type?
if you are unfamiliar with std::expected then check out https://en.cppreference.com/w/cpp/utility/expected.html
it’s basically a type that let you return either a “value” or an “error” and the caller of the function has to check which did the function return. it’s a modern way of handling errors in C++ that was introduced in C++23