forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fail.h
40 lines (31 loc) · 1.4 KB
/
Fail.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace test { //implicit instantiation
template<bool B, class T, class F>
struct conditional { typedef T type; };
template<class T, class F>
struct conditional<false, T, F> { typedef F type; };
template <typename _Tp> using example = typename conditional<true,int,float>::type;
}//end namespace test
namespace test { //nested name specifier
class HasSubType {
public:
class SubType {};
};
HasSubType::SubType FunctionUsingSubtype(HasSubType::SubType s){return s;}
extern HasSubType::SubType variable;//locale::id id
}//end namespace test // This problem is bypassed by skipping types containing "::"
namespace test { //restrict keyword: try include/mmprivate.h and strlcpy.h when fixed
typedef long ssize_t;
typedef unsigned int size_t;
//Has signature of readlink from unistd.h
extern ssize_t FunctionUsingRestrictPtr (const char *__restrict __path,
char *__restrict __buf, size_t __len);
}//end namespace test // This is bypassed by forcibly removing restrict from types
// namespace test { //default template arg
// template <typename T,int MAX=100> class Stack {
// };
// Stack<int> FunctionReturningStack(){return Stack<int>();}
// }//end namespace test // Fixed with callback, strip old default args before including new file
// namespace test {
// //#include<tuple> //'tie' function
// //commented out to skip huge output
// } //Fixed bug in VisitFunctionDecl