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::ostringstr eam osstr(std::ios: :out);
std::ostream_it erator<charosit (osstr);
ifstream fh("/tmp/log.conf");
getline(fh,line );
cout << line << endl;
boost::regex_re place(osit,line .begin(),line.e nd(),rex1,post, boost::match_de fault
| boost::format_a ll);
//cout <<"--"<<rex1.str()<< "--"<<endl;
fh.close();
return 1;
}
getting compiler error as below
# g++ -o runme filename.cc
/usr/include/g++/stl_uninitializ ed.h:71: template instantiation depth
exceeds maximum of 17
/usr/include/g++/stl_uninitializ ed.h:71: (use -ftemplate-depth-NN to
increase the maximum)
/usr/include/g++/stl_uninitializ ed.h:71: instantiating
`__uninitialize d_copy_aux<cons t boost::sub_matc h<char **,
boost::sub_matc h<char **>(const boost::sub_matc h<char **, const
boost::sub_matc h<char **, boost::sub_matc h<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::ostringstr eam osstr(std::ios: :out);
std::ostream_it erator<charosit (osstr);
ifstream fh("/tmp/log.conf");
getline(fh,line );
cout << line << endl;
boost::regex_re place(osit,line .begin(),line.e nd(),rex1,post, boost::match_de fault
| boost::format_a ll);
//cout <<"--"<<rex1.str()<< "--"<<endl;
fh.close();
return 1;
}
getting compiler error as below
# g++ -o runme filename.cc
/usr/include/g++/stl_uninitializ ed.h:71: template instantiation depth
exceeds maximum of 17
/usr/include/g++/stl_uninitializ ed.h:71: (use -ftemplate-depth-NN to
increase the maximum)
/usr/include/g++/stl_uninitializ ed.h:71: instantiating
`__uninitialize d_copy_aux<cons t boost::sub_matc h<char **,
boost::sub_matc h<char **>(const boost::sub_matc h<char **, const
boost::sub_matc h<char **, boost::sub_matc h<char **, __false_type)
............... ...............
............... ...............
............... ...............
Comment