2014-08-13 16:08:36 +02:00

39 lines
1.1 KiB
C++

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
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
namespace test { //default template arg
template <typename T,int MAX=100> class Stack {
};
Stack<int> FunctionReturningStack(){return Stack<int>();}
}//end namespace test
namespace test {
//#include<tuple> //'tie' function
//commented out to skip huge output
}