Created
April 8, 2015 15:44
-
-
Save suchasplus/5fb84d36312fec32a8f8 to your computer and use it in GitHub Desktop.
c++ compare class type with string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <type_traits> | |
int main() | |
{ | |
std::string s; | |
std::cout << std::is_same<decltype(s), std::string>::value << std::endl; | |
char s2[] = ""; | |
std::cout << std::is_same<decltype(s2), std::string>::value << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment