"using boost::shared_ptr;" << endl <<
endl;
- if (!ns.empty()) {
+ // the following code would not compile:
+ // using namespace ;
+ // using namespace ::;
+ if ( (!ns.empty()) && (ns.compare(" ::") != 0)) {
f_skeleton <<
"using namespace " << string(ns, 0, ns.size()-2) << ";" << endl <<
endl;
"using boost::shared_ptr;" << endl <<
endl;
- if (!ns.empty()) {
+ // the following code would not compile:
+ // using namespace ;
+ // using namespace ::;
+ if ( (!ns.empty()) && (ns.compare(" ::") != 0)) {
f_skeleton <<
"using namespace " << string(ns, 0, ns.size()-2) << ";" << endl <<
endl;