Re: [Boost-bugs] [Boost C++ Libraries] #7775: Allow algorithm::join to accept a container of char*

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7775: Allow algorithm::join to accept a container of char*
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-13 05:51:27


#7775: Allow algorithm::join to accept a container of char*
---------------------------------------------+------------------------------
  Reporter: Sergey Mitsyn <svm at jinr.ru> | Owner: marshall
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: algorithm
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------------+------------------------------

Comment (by Sergey Mitsyn <svm at jinr.ru>):

 Replying to [comment:1 marshall]:
> The problem is not creating from an array of `char *`, but from a
 container of `char *`.
>
> `boost::algorithm::join` takes a "container (A) of containers (B)" and
 returns a "container (B)".
>
> When the (B) container is just "char *", it has no facility for creating
 such a container.
> {{{
> std::string arr[] = { "Hi", "Mom" };
> boost::algorithm::join(arr, ", ");
> }}}
> works fine (and returns a `std::string`)

 Yep, that works perfectly! Didn't know c++03 allows that. Thanks!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7775#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC