Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <string>
#include <iostream>
#include "optional.hpp"
int main() {
std::optional<std::string> empty;
std::cout << empty.value_or("no value") << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment