template<typename T>
void pp(T &&v)
{
cout<<v;
}
template<typename ...Args>
void logOut(const char*const fn, int line, Args ... args)
{
initializer_list<int>{ (pp(args),0)... };
//int arr[] = {(pp(args),0)...};
cout<<"["<<base_name(fn)<<":"<<line<<"]";
}
#define LOG_OUT(...) logOut(__FILE__,__LINE__,__VA_ARGS__)
template<typename T>
void pp2(ostringstream&ostr,T &&v)
{
ostr<<v;
}
static const std::string this_file (__FILE__);
template<const std::string* p=&this_file,unsigned l=__LINE__,typename ...Args>
void logOut2(Args ...args)
{
ostringstream ostr;
initializer_list<int>{ (pp2(ostr,args),0)... };
ostr<<"["<<base_name(*p)<<":"<<l<<"]";
cout << ostr.str();
}