Boost logo

Boost :

From: outlaw (outlaw_at_[hidden])
Date: 2000-03-30 08:36:44

After using the dir_it library at
I've modified get<user_execute> as follows. I use Msvc6 with Dinkumware's
library, and name.substr was throwing an exception when the file had no "."
in the name (pos == npos) under NT5.

  template <> get<user_execute>::operator user_execute::value_type() const
   std::string name(*m_it);
   std::string::size_type pos;
   if( (pos = name.find_last_of('.') ) != std::string::npos)
    std::string ext( name.substr( pos ) );
    return ext == ".exe" || ext == ".bat";
   return false;

Mario Contestabile

Boost list run by bdawes at, gregod at, cpdaniel at, john at