This commit is contained in:
fuwangqin 2016-10-14 11:46:47 +08:00
commit b220d1016f
2 changed files with 29 additions and 4 deletions

View File

@ -1,6 +1,14 @@
#pragma once #pragma once
struct user struct people
{
//Gson@optional
acl::string aa;
//Gson@optional
acl::string bb;
};
struct user : people
{ {
user(const char* user_name, const char* user_domain, user(const char* user_name, const char* user_domain,
int user_age, bool user_male) int user_age, bool user_male)
@ -31,6 +39,25 @@ struct message
std::vector<user*> *user_vector_ptr = nullptr; std::vector<user*> *user_vector_ptr = nullptr;
std::map<acl::string, user*> *user_map_ptr = nullptr; std::map<acl::string, user*> *user_map_ptr = nullptr;
//const char* ptr = nullptr; // error
//const char* data = "hello world"; // error
//char* data = "hello world"; // error
//char ch = 'A'; // error
//unsigned char ch = 'b'; // error
//const user* u1 = nullptr; // error
int n = 100; // ok
long n1 = 1000; // ok
long long int n2 = 1000; // ok
short n3 = 100; // ok
//Gson@optional
user* u = nullptr; // ok
//char ch1;
//const int n4 = 100; // error
//const long n5 = 1000; // error
//const long long int n6 = 1000; // error
//const short n7 = 100; // error
message() {} message() {}
~message() ~message()

View File

@ -1305,7 +1305,7 @@ void gsoner::parse_code()
std::cout << codes_.substr(start, ii - start).c_str() << std::endl; std::cout << codes_.substr(start, ii - start).c_str() << std::endl;
ii = 0; ii = 0;
count = 0; count = 0;
while (ii < pos_) while (ii < (std::size_t) pos_)
{ {
if (codes_[ii] == '\n') if (codes_[ii] == '\n')
{ {
@ -1511,8 +1511,6 @@ bool gsoner::check_pragma()
return false; return false;
} }
} // namespace acl } // namespace acl
#endif // end ACL_USE_CPP11 #endif // end ACL_USE_CPP11