Skip to content

Instantly share code, notes, and snippets.

@kioba
Created November 30, 2015 16:23
Show Gist options
  • Save kioba/6084fb72c8a7c795d53b to your computer and use it in GitHub Desktop.
Save kioba/6084fb72c8a7c795d53b to your computer and use it in GitHub Desktop.
Is it true or false?
#include <iostream>
#include <memory>
int main()
{
std::shared_ptr<bool> boolean(new bool(false));
if (boolean) {
std::cout << "True" << std::endl;
} else {
std::cout << "False" << std::endl;
}
std::cin.get();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment