Opened 13 years ago

Closed 11 years ago

#4048 closed Bugs (fixed)

thread::id formatting involves locale

Reported by: Andrey Semashev Owned by: viboes
Milestone: Boost 1.49.0 Component: thread
Version: Boost 1.42.0 Severity: Problem
Keywords: thread id io Cc: viboes

Description

Originated from here:

https://sourceforge.net/projects/boost-log/forums/forum/710022/topic/3605632

The thread::id formatting code relies on the stream's operator<<, which involves the locale installed into the stream. This can result in insertion of grouping delimiters and other decorations. This style of formatting is useful for regular numbers, but is inappropriate for thread identifiers. I would expect the thead::id to be always formatted as a hex value with no delimiters, regardless of the locale.

Change History (7)

comment:1 by viboes, 12 years ago

This should be a feature request.

in reply to:  1 comment:2 by Andrey Semashev, 12 years ago

Replying to viboes:

This should be a feature request.

I don't think so. Locale-specific formatting, as it works now, is surely not a feature.

comment:3 by viboes, 11 years ago

Milestone: Boost 1.43.0To Be Determined
Owner: changed from Anthony Williams to viboes
Status: newassigned

Is somebody against in formating thread::is using std::hex manipulator?

comment:4 by viboes, 11 years ago

Milestone: To Be DeterminedBoost 1.49.0
Resolution: fixed
Status: assignedclosed

Committed in trunk #75858

comment:5 by viboes, 11 years ago

Cc: viboes added
Resolution: fixed
Status: closedreopened

Close it after merging to release

comment:6 by viboes, 11 years ago

Added ios_flags_saver to restore the ios flags. Committed revision #76011.

comment:7 by viboes, 11 years ago

Resolution: fixed
Status: reopenedclosed

Committed in release at #76291

Note: See TracTickets for help on using tickets.