Y
Yahooooooooo
Hi,
whats the issue in below code ...
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iterator>
#include <boost/regex.hpp>
using namespace std;
extern const char* pre= " "; // i want to remove space
extern const char* post="";
int main(void)
{
string line;
boost::regex rex1(pre);
std:stringstream osstr(std::ios:ut);
std:stream_iterator<char> osit(osstr);
ifstream fh("/tmp/log.conf");
getline(fh,line);
cout << line << endl;
boost::regex_replace(osit,line.begin(),line.end(),rex1,post,boost::match_default
| boost::format_all);
//cout <<"--"<<rex1.str()<<"--"<<endl;
fh.close();
return 1;
}
getting compiler error as below
# g++ -o runme filename.cc
/usr/include/g++/stl_uninitialized.h:71: template instantiation depth
exceeds maximum of 17
/usr/include/g++/stl_uninitialized.h:71: (use -ftemplate-depth-NN to
increase the maximum)
/usr/include/g++/stl_uninitialized.h:71: instantiating
`__uninitialized_copy_aux<const boost::sub_match<char *> *,
boost::sub_match<char *> *>(const boost::sub_match<char *> *, const
boost::sub_match<char *> *, boost::sub_match<char *> *, __false_type)
..............................
..............................
..............................
whats the issue in below code ...
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <iterator>
#include <boost/regex.hpp>
using namespace std;
extern const char* pre= " "; // i want to remove space
extern const char* post="";
int main(void)
{
string line;
boost::regex rex1(pre);
std:stringstream osstr(std::ios:ut);
std:stream_iterator<char> osit(osstr);
ifstream fh("/tmp/log.conf");
getline(fh,line);
cout << line << endl;
boost::regex_replace(osit,line.begin(),line.end(),rex1,post,boost::match_default
| boost::format_all);
//cout <<"--"<<rex1.str()<<"--"<<endl;
fh.close();
return 1;
}
getting compiler error as below
# g++ -o runme filename.cc
/usr/include/g++/stl_uninitialized.h:71: template instantiation depth
exceeds maximum of 17
/usr/include/g++/stl_uninitialized.h:71: (use -ftemplate-depth-NN to
increase the maximum)
/usr/include/g++/stl_uninitialized.h:71: instantiating
`__uninitialized_copy_aux<const boost::sub_match<char *> *,
boost::sub_match<char *> *>(const boost::sub_match<char *> *, const
boost::sub_match<char *> *, boost::sub_match<char *> *, __false_type)
..............................
..............................
..............................