Modify

Opened 6 years ago

Closed 8 weeks ago

#6553 closed Patches (wontfix)

Boost.Format - format object implicitly converts to string

Reported by: mpbecey7gu@… Owned by: James E. King, III
Milestone: To Be Determined Component: format
Version: Boost 1.47.0 Severity: Not Applicable
Keywords: Cc:

Description

As discussed on boost-users, it is desirable to have formatter objects implicitly convert to string. This is trivial to enable, and I have attached the modified file. I would hope that this gets accepted into the development branch.

Attachments (1)

format_class.hpp (7.2 KB) - added by mpbecey7gu@… 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by mpbecey7gu@…

Attachment: format_class.hpp added

comment:1 Changed 6 years ago by Daryle Walker

Converting a format object to a string object can be highly convenient, but the two object types aren't conceptually and/or functionally equivalent (or even nearly so). Consider the potential consequences before adding this change. Maybe the conversion operator could use the C++11 "explicit" marker, but I haven't considered if that solution would satisfy anyone.

comment:2 Changed 2 months ago by James E. King, III

Can you describe the use case for this? Would it put the format string into a string?

comment:3 Changed 8 weeks ago by James E. King, III

Owner: changed from Samuel Krempp to James E. King, III
Status: newassigned

comment:4 Changed 8 weeks ago by James E. King, III

Resolution: wontfix
Status: assignedclosed

Closing as wontfix, as the request is not specific enough and untouched for 6 years. The existing mechanism has been around for a while and works. If folks want to revive this is can be done on the mailing list and/or github issues.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain James E. King, III.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.