Boost logo

Boost Users :

Subject: Re: [Boost-users] How to convert std::string into basic_string
From: manish4gupta (manish_at_[hidden])
Date: 2009-09-16 05:25:28


Is this that constructor...
basic_string& assign(InputIter first, InputIter last)
   {
      //Dispatch depending on integer/iterator
      const bool aux_boolean = containers_detail::is_convertible<InputIter,
std::size_t>::value;
      typedef containers_detail::bool_<aux_boolean> Result;
      return this->priv_assign_dispatch(first, last, Result());
   }

I am new to boost-interprocess. I don't know much about this. Any example
converting the std:: string/c-string into boost basic_string will help me. I
will be really thankful to you.

 

Mathias Gaunard-2 wrote:
>
> manish4gupta wrote:
>
>> How to convert std::string into boost string. I am doing some
>> benchmarking
>> by inserting the std::string value instead of char_string(ypedef of
>> basic_string) but i am getting error message.
>
> To convert between two different types of basic_string, you need to use
> the constructor that takes two iterators.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

-- 
View this message in context: http://www.nabble.com/How-to-convert-std%3A%3Astring-into-basic_string-tp25446943p25468884.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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