2017-03-05 23:44:20 +00:00
|
|
|
namespace ns {
|
|
|
|
enum VarType {};
|
|
|
|
|
|
|
|
template<typename _>
|
|
|
|
struct Holder {
|
|
|
|
static constexpr VarType static_var = (VarType)0x0;
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename _>
|
|
|
|
const typename VarType Holder<_>::static_var;
|
|
|
|
|
|
|
|
|
|
|
|
int Foo = Holder<int>::static_var;
|
|
|
|
int Foo2 = Holder<int>::static_var;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
OUTPUT:
|
|
|
|
{
|
|
|
|
"types": [{
|
|
|
|
"id": 0,
|
|
|
|
"usr": "c:@N@ns@E@VarType",
|
|
|
|
"short_name": "VarType",
|
|
|
|
"qualified_name": "ns::VarType",
|
2017-04-05 08:06:18 +00:00
|
|
|
"definition": "2:8",
|
2017-04-03 01:34:15 +00:00
|
|
|
"instantiations": [0],
|
2017-04-05 08:06:18 +00:00
|
|
|
"uses": ["*2:8", "*6:22", "*6:44", "*10:18"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}, {
|
|
|
|
"id": 1,
|
|
|
|
"usr": "c:@N@ns@ST>1#T@Holder",
|
|
|
|
"short_name": "Holder",
|
|
|
|
"qualified_name": "ns::Holder",
|
2017-04-05 08:06:18 +00:00
|
|
|
"definition": "5:10",
|
2017-03-05 23:44:20 +00:00
|
|
|
"vars": [0],
|
2017-04-05 08:06:18 +00:00
|
|
|
"uses": ["*5:10", "*10:26", "13:13", "14:14"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}],
|
2017-03-07 18:17:49 +00:00
|
|
|
"vars": [{
|
2017-03-05 23:44:20 +00:00
|
|
|
"id": 0,
|
|
|
|
"usr": "c:@N@ns@ST>1#T@Holder@static_var",
|
|
|
|
"short_name": "static_var",
|
|
|
|
"qualified_name": "ns::Holder::static_var",
|
2017-04-05 08:06:18 +00:00
|
|
|
"declaration": "6:30",
|
|
|
|
"definition": "10:37",
|
2017-03-05 23:44:20 +00:00
|
|
|
"variable_type": 0,
|
|
|
|
"declaring_type": 1,
|
2017-04-05 08:06:18 +00:00
|
|
|
"uses": ["6:30", "10:37", "13:26", "14:27"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}, {
|
|
|
|
"id": 1,
|
|
|
|
"usr": "c:@N@ns@Foo",
|
|
|
|
"short_name": "Foo",
|
|
|
|
"qualified_name": "ns::Foo",
|
2017-04-05 08:06:18 +00:00
|
|
|
"definition": "13:7",
|
|
|
|
"uses": ["13:7"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}, {
|
|
|
|
"id": 2,
|
|
|
|
"usr": "c:@N@ns@Foo2",
|
|
|
|
"short_name": "Foo2",
|
|
|
|
"qualified_name": "ns::Foo2",
|
2017-04-05 08:06:18 +00:00
|
|
|
"definition": "14:7",
|
|
|
|
"uses": ["14:7"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}]
|
|
|
|
}
|
2017-03-07 18:17:49 +00:00
|
|
|
*/
|