#include <string>
using namespace std;
static class Trans
{
public :
static wstring AddDoubleQuotes( wstring value) { return L"\" " + value + L"\" " ; }
static wstring AddDoubleQuotes( double value) { return to_wstring( value) ; }
template < class T>
static wstring Trans:: GetSubwstring ( wstring key, T value)
{
if ( key ! = L"" )
return AddDoubleQuotes( key) + L":" + AddDoubleQuotes( value) ;
else return AddDoubleQuotes( value) ;
} ;
Trans( ) { GetSubwstring( L"" , 0 ) ; }
} ;
int main( void )
{
Trans:: GetSubwstring ( L"" ,0 ) ;
getchar ( ) ;
return 0 ;
}
I2luY2x1ZGUgPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKc3RhdGljIGNsYXNzIFRyYW5zCnsKcHVibGljOgoJc3RhdGljIHdzdHJpbmcgQWRkRG91YmxlUXVvdGVzKHdzdHJpbmcgdmFsdWUpIHsgcmV0dXJuIEwiXCIiICsgdmFsdWUgKyBMIlwiIjsgfQoJc3RhdGljIHdzdHJpbmcgQWRkRG91YmxlUXVvdGVzKGRvdWJsZSB2YWx1ZSkgeyByZXR1cm4gdG9fd3N0cmluZyh2YWx1ZSk7IH0KCgl0ZW1wbGF0ZSA8Y2xhc3MgVD4KCXN0YXRpYyB3c3RyaW5nIFRyYW5zOjpHZXRTdWJ3c3RyaW5nKHdzdHJpbmcga2V5LCBUIHZhbHVlKQoJewoJCWlmIChrZXkgIT0gTCIiKQoJCQlyZXR1cm4gQWRkRG91YmxlUXVvdGVzKGtleSkgKyBMIjoiICsgQWRkRG91YmxlUXVvdGVzKHZhbHVlKTsKCQllbHNlIHJldHVybiBBZGREb3VibGVRdW90ZXModmFsdWUpOwoJfTsKCglUcmFucygpIHsgR2V0U3Vid3N0cmluZyhMIiIsIDApOyB9Cn07CgppbnQgbWFpbih2b2lkKQp7CglUcmFuczo6R2V0U3Vid3N0cmluZyhMIiIsMCk7CglnZXRjaGFyKCk7CglyZXR1cm4gMDsKfQ==
compilation info
prog.cpp:10:17: error: extra qualification ‘Trans::’ on member ‘GetSubwstring’ [-fpermissive]
static wstring Trans::GetSubwstring(wstring key, T value)
^~~~~
prog.cpp:3:1: error: a storage class can only be specified for objects and functions
static class Trans
^~~~~~
stdout