Omgili, forum search, forums search, search forums, discussion search,discussions search, search discussions, board search, boards search, search boards
  Advanced Search

[boost] [Format] Making a change

On Mon, 13 Feb 2012 03:16:12 -0600, "John M. Dlugosz" <...@snkmail.com

I'd like to make a change to the Boost Format library, to add a conversion operator to the
matching string class.
It appears to have not been worked on in a number of years.
Reading through the web site, I find details on how to submit new libraries, and how to
edit the web page, but nothing on submitting updates to existing libraries.

How would I go about doing that, for this library in particular?

—John

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost



On Mon, 13 Feb 2012 01:39:58 -0800 (PST), Vicente Botet <...@wanadoo.fr

John M. Dlugosz wrote

Hi,

This http://www.boost.org/community/requests.html should help you.

* Discuss the issue on the dev list
* Create a ticket on the Trac System adding as much information as possible,
patch containing the code modified, tests, doc, ...

Best,
Vicente

Best,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/Format-Making-a-change-tp4383214p4383264.htm l
Sent from the Boost - Dev mailing list archive at Nabble.com.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Mon, 13 Feb 2012 07:37:33 -0600, "John M. Dlugosz" <...@snkmail.com

Interestingly, that page states, "You can also try submitting a feature request to our
ticket system, but experience has shown that posting to either of the mailing lists is
usually a more effective way to get attention of boost developers."

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, 14 Feb 2012 18:51:48 -0800, "Jeffrey Lee Hellrung, Jr." <...@gmail.com

On Tue, Feb 14, 2012 at 4:18 AM, Olaf van der Spek <...@vdspek.org[...]

I don't see a problem with 1. It makes your conversion intentions clear,
and I don't find it onerous in the least.

(My opinion, of course.)

- Jeff

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 03:27:15 +0000, Nathan Ridge <...@hotmail.com

Upon some reflection, neither of these look natural to me.

What would look natural is the following, implemented using C++11 variadic
templates (and then the return value could be a string in the first place):

set(dict2, "link", boost::format("../../?q=%s", name));

Regards,
Nate


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 09:42:16 +0100, Olaf van der Spek <...@vdspek.org

On Wed, Feb 15, 2012 at 4:27 AM, Nathan Ridge <...@hotmail.com
Yes, that'd be even better, but variadic templates won't be an option
(for me) any time soon.
--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 03:16:00 -0800 (PST), Vicente Botet <...@wanadoo.fr

Nathan Ridge wrote

Note that Boost.Format works differently depending on the locale of the
Output Stream. So, I guess your proposal is not an option.

IIRC, when you use explicitly the str function you are stating explicitly
that you want to use the default locale.

I don't see yet why

set(dict2, "link", str(format("../../?q=%s") % name));

is not satisfactory.

Best,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/Format-Making-a-change-tp4383214p4390084.htm l
Sent from the Boost - Dev mailing list archive at Nabble.com.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 12:18:40 +0100, Olaf van der Spek <...@vdspek.org

On Wed, Feb 15, 2012 at 12:16 PM, Vicente Botet
<...@wanadoo.fr
Argh, those silly locales again.

It's still worse than 2.

--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 08:49:52 -0500, Jeff Flinn <...@gmail.com

Which is worse than:

set(dict2, "link", "../../?q=" + name);

Facetiousness aside, how would wstrings be dealt with?

Jeff

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 15:51:46 +0100, Olaf van der Spek <...@vdspek.org

On Wed, Feb 15, 2012 at 2:49 PM, Jeff Flinn <...@gmail.com
Yeah, hmm...

Same as before?

--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, 14 Feb 2012 00:04:52 -0500, Daryle Walker <...@hotmail.com

Wasn't there recently another thread about this?  If you didn't read that thread, it referredto another thread from 7 years ago about the same thing.  Boost.Format already provides amember function and a free function to convert a format object to a string.  The conversionsthrow if the format object hasn't had all of its parameters filled in.  You want to add a thirdmethod?  Unlike int vs. double, a formatting object and a string are NOT conceptually the samething, so adding an implicit conversion would be bad.  (Actually, we should limit implicitconversions in general; so converting weakly-connected types should definitely be out.)
Daryle W.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, 14 Feb 2012 06:56:40 -0600, "John M. Dlugosz" <...@snkmail.com

Yes, I do indeed. Both forms of str require extra parens and is a bit awkward for
in-place formatting of strings, in particular for error messages like the argument to an
exception constructor.

Would it go over well if we _removed_ the ability for ostream to take a formatter without
an extra function call? After all, you could use str for that too! My impression is that
the ostream use-case was thought about, but the exception case was not.
I do admit that for a named string variable, initializing it using free-function str isn't
too bad.

—John

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, 14 Feb 2012 14:22:11 +0100, Olaf van der Spek <...@vdspek.org

On Tue, Feb 14, 2012 at 1:56 PM, John M. Dlugosz <...@snkmail.com
Probably not. Why break old code?

But it could be better.

That might a bit problematic. :p
Samuel Krempp is listed as the author of that lib.

--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, 14 Feb 2012 13:18:25 +0100, Olaf van der Spek <...@vdspek.org

On Tue, Feb 14, 2012 at 6:04 AM, Daryle Walker <...@hotmail.com
Yes, please

Why would that be bad? The conversion from format to string is well
defined and used (very) frequently. It's also cumbersome at the
moment.

Compare:
1: set(dict2, "link", (boost::format("../../?q=%s") % name).str());
2: set(dict2, "link", boost::format("../../?q=%s") % name);

--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, 14 Feb 2012 07:00:11 -0600, "John M. Dlugosz" <...@snkmail.com

I've submitted a changed file (one line added, plus comments) as Ticket #6553.
As far as I know, other threads have just complained about the lack and lamented it. So
let's _do_ it already. Is there a committee, an official owner of that component, or
what? How do we get that change accepted in the official build?

—John

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, 15 Feb 2012 02:15:46 +0900, Michel Morin <...@gmail.com

It would be better to submit patches rather than modified files.
To create a patch, you can use "svn diff".

Plus, adding updates to the documentation and tests
make your work more appealing.

Regards,
Michel

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Discussion Title: [boost] [Format] Making a change
Title Keywords: [boost]  [Format]  Making  change