-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
maodoutech
committed
Feb 14, 2017
1 parent
da5f2b2
commit 9bf362b
Showing
2 changed files
with
45 additions
and
178 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#include "macros.h" | ||
#include <iostream> | ||
|
||
using namespace std; | ||
|
||
class TestClass { | ||
public: | ||
TestClass() {} | ||
private: | ||
DISALLOW_COPY(TestClass); | ||
}; | ||
|
||
GLOBAL_INIT() { | ||
int x = 10; | ||
cout << "xx:" << x << endl; | ||
} | ||
|
||
int main(int argc, const char *argv[]) | ||
{ | ||
cout << "Hi macros!" << endl; | ||
TestClass class1; | ||
//TestClass class2 = class1; | ||
|
||
int CONCAT(a,b) = 10; | ||
cout << ab << endl; | ||
|
||
int array[] = {0, 1, 2}; | ||
cout << arraysize(array) << endl; | ||
|
||
const int x1 = 10; | ||
long x2 = base::implicit_cast<long>(x1); | ||
cout << x2 << endl; | ||
|
||
CASSERT(true, xxxxxxxxxxxxxxxxxxxxxxxx); | ||
|
||
base::ignore_result(x1); | ||
|
||
string string1 = SYMBOLSTR(abc); | ||
cout << string1 << endl; | ||
return 0; | ||
} |