Opened 15 years ago

Closed 15 years ago

#1196 closed Bugs (fixed)

Patch: when BOOST_NO_STD_LOCALE is not defined, boost/format/internals.hpp fails to compile.

Reported by: andyc@… Owned by: Samuel Krempp
Milestone: Boost 1.35.0 Component: format
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

With gcc, we get a compile error when BOOST_NO_STD_LOCALE is not defined:

.../boost/format/internals.hpp:106: warning: unused parameter `locale_t*loc_default'

The following patch fixes it:

===== boost/format/internals.hpp 1.1 vs + =====
--- 1.1/boost/format/internals.hpp      2007-08-17 11:57:50 +01:00
+++ +/boost/format/internals.hpp        2007-08-17 13:26:09 +01:00
@@ -104,6 +104,7 @@
     template<class Ch, class Tr>
     void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os,
                       boost::io::detail::locale_t * loc_default) const {
+        (void) loc_default; // keep compiler quiet if we don't support locales
         // set the state of this stream according to our params
         if(width_ != -1)
             os.width(width_);

Change History (2)

comment:1 by René Rivera, 15 years ago

Component: Noneformat
Owner: set to Samuel Krempp

comment:2 by John Maddock, 15 years ago

Milestone: To Be DeterminedBoost 1.35.0
Resolution: fixed
Status: newclosed

Fixed in SVN Trunk.

Note: See TracTickets for help on using tickets.