Boost logo

Boost Users :

From: Sebastien Martel (smartel_at_[hidden])
Date: 2005-04-20 01:54:19


Hello,

    It seems that the optimization introduced in token_functions.hpp
    consisting of converting += into assign calls introduced a new requirement on Type :

  template <
    typename TokenizerFunc = char_delimiters_separator<char>,
    typename Iterator = std::string::const_iterator,
    typename Type = std::string
>
  class tokenizer {
        //...
        }

        In my case, Type is a custom string class that doesn't
        implement assign, but has operator +=. I want to avoid
        changing the interface of the string class.

        Is Tokenizer reasonable in requiring Type to implement assign ?

        Could assign_or_plus_equal (token_functions.hpp) fall
        back on += if assign cannot be found ?
        It currently does so if the iterator is an input iterator, how
        about expanding it to test Type traits(!) for an assign member ?

        Ideas ?
        
        Thanks!
        

-- 
Best regards,
 Sebastien                          mailto:smartel_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net