#include #include boost::optional maybeInt() int main() { boost::optional maybe = maybeInt(); if(!maybe) std::cout << "object is null\n"; }