Skip to content

Instantly share code, notes, and snippets.

@kantoniak
Created May 1, 2017 16:16
Show Gist options
  • Save kantoniak/07ac42a6760399d8dd724d0e7b5e9d39 to your computer and use it in GitHub Desktop.
Save kantoniak/07ac42a6760399d8dd724d0e7b5e9d39 to your computer and use it in GitHub Desktop.
#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