Move all C++ tests to cpp.
This commit is contained in:
39
cpp/test_namespace_rename.cpp
Normal file
39
cpp/test_namespace_rename.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
//#include <wchar_tiostream>
|
||||
#include <iostream>
|
||||
|
||||
namespace std
|
||||
{
|
||||
namespace tr1
|
||||
{
|
||||
template <class Ch>
|
||||
class A
|
||||
{
|
||||
public:
|
||||
void f()
|
||||
{
|
||||
std::cout << "I am std::tr1::A<Ch>::f()" << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
void A<wchar_t>::f()
|
||||
{
|
||||
std::wcout << L"I am std::tr1::A<wchar_t>::f()" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
using std::tr1::A;
|
||||
}
|
||||
|
||||
int main( void )
|
||||
{
|
||||
std::A<wchar_t> a;
|
||||
a.f();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user