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:
|
|
|
|
{
|
2017-12-12 05:15:37 +00:00
|
|
|
"includes": [],
|
|
|
|
"skipped_by_preprocessor": [],
|
2017-03-05 23:44:20 +00:00
|
|
|
"types": [{
|
|
|
|
"id": 0,
|
|
|
|
"usr": "c:@N@ns@E@VarType",
|
|
|
|
"short_name": "VarType",
|
2017-04-15 04:58:07 +00:00
|
|
|
"detailed_name": "ns::VarType",
|
2017-04-05 08:29:15 +00:00
|
|
|
"definition_spelling": "2:8-2:15",
|
|
|
|
"definition_extent": "2:3-2:18",
|
2017-12-12 05:15:37 +00:00
|
|
|
"parents": [],
|
|
|
|
"derived": [],
|
|
|
|
"types": [],
|
|
|
|
"funcs": [],
|
|
|
|
"vars": [],
|
2017-04-21 07:04:56 +00:00
|
|
|
"instances": [0],
|
2017-04-19 04:58:39 +00:00
|
|
|
"uses": ["2:8-2:15", "6:22-6:29", "6:44-6:51", "10:18-10:25"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}, {
|
|
|
|
"id": 1,
|
|
|
|
"usr": "c:@N@ns@ST>1#T@Holder",
|
|
|
|
"short_name": "Holder",
|
2017-04-15 04:58:07 +00:00
|
|
|
"detailed_name": "ns::Holder",
|
2017-04-05 08:29:15 +00:00
|
|
|
"definition_spelling": "5:10-5:16",
|
|
|
|
"definition_extent": "5:3-7:4",
|
2017-12-12 05:15:37 +00:00
|
|
|
"parents": [],
|
|
|
|
"derived": [],
|
|
|
|
"types": [],
|
|
|
|
"funcs": [],
|
2017-03-05 23:44:20 +00:00
|
|
|
"vars": [0],
|
2017-12-12 05:15:37 +00:00
|
|
|
"instances": [],
|
2017-04-19 04:58:39 +00:00
|
|
|
"uses": ["5:10-5:16", "10:26-10:32", "13:13-13:19", "14:14-14:20"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}],
|
2017-12-12 05:15:37 +00:00
|
|
|
"funcs": [],
|
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",
|
2017-04-15 04:58:07 +00:00
|
|
|
"detailed_name": "const ns::VarType ns::Holder::static_var",
|
2017-04-05 08:29:15 +00:00
|
|
|
"declaration": "6:30-6:40",
|
|
|
|
"definition_spelling": "10:37-10:47",
|
|
|
|
"definition_extent": "9:3-10:47",
|
2017-03-05 23:44:20 +00:00
|
|
|
"variable_type": 0,
|
|
|
|
"declaring_type": 1,
|
2017-05-21 01:26:50 +00:00
|
|
|
"is_local": false,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-04-05 08:29:15 +00:00
|
|
|
"uses": ["6:30-6:40", "10:37-10:47", "13:26-13:36", "14:27-14:37"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}, {
|
|
|
|
"id": 1,
|
|
|
|
"usr": "c:@N@ns@Foo",
|
|
|
|
"short_name": "Foo",
|
2017-04-15 04:58:07 +00:00
|
|
|
"detailed_name": "int ns::Foo",
|
2017-04-05 08:29:15 +00:00
|
|
|
"definition_spelling": "13:7-13:10",
|
|
|
|
"definition_extent": "13:3-13:36",
|
2017-05-21 01:26:50 +00:00
|
|
|
"is_local": false,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-04-05 08:29:15 +00:00
|
|
|
"uses": ["13:7-13:10"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}, {
|
|
|
|
"id": 2,
|
|
|
|
"usr": "c:@N@ns@Foo2",
|
|
|
|
"short_name": "Foo2",
|
2017-04-15 04:58:07 +00:00
|
|
|
"detailed_name": "int ns::Foo2",
|
2017-04-05 08:29:15 +00:00
|
|
|
"definition_spelling": "14:7-14:11",
|
|
|
|
"definition_extent": "14:3-14:37",
|
2017-05-21 01:26:50 +00:00
|
|
|
"is_local": false,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-04-05 08:29:15 +00:00
|
|
|
"uses": ["14:7-14:11"]
|
2017-03-05 23:44:20 +00:00
|
|
|
}]
|
|
|
|
}
|
2017-03-07 18:17:49 +00:00
|
|
|
*/
|