11 Mar
                
                    2005
                
            
            
                11 Mar
                
                '05
                
            
            
            
        
    
                4:43 p.m.
            
        Martin wrote:
Is it possible to use the BOOST_FOREACH technology to create something that work with objects where end is the default constructor?
example boost::filesystem
for (directory_iterator itr("C:\\"); itr != directory_iterator(); ++itr) ..
BOOST_FOREACH_2(directory_iterator itr("C:\\"))
Possible? Yes, but my gut tells me not to. BOOST_FOREACH works with ranges, not iterators, and i don't want to create confusion about that. FWIW, you can iterate over a directory like: directory_iterator begin("C:\\"), end; BOOST_FOREACH(path p, std::make_pair(begin,end)) { } -- Eric Niebler Boost Consulting www.boost-consulting.com