diff options
Diffstat (limited to 'boost/format/format_class.hpp')
-rw-r--r-- | boost/format/format_class.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/boost/format/format_class.hpp b/boost/format/format_class.hpp index 2ac59ef280..ae98be4d75 100644 --- a/boost/format/format_class.hpp +++ b/boost/format/format_class.hpp @@ -68,6 +68,18 @@ namespace boost { { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); } #endif + template<class T> + basic_format& operator%(volatile const T& x) + { /* make a non-volatile copy */ const T v(x); + /* pass the copy along */ return io::detail::feed<CharT, Tr, Alloc, const T&>(*this, v); } + +#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST + template<class T> + basic_format& operator%(volatile T& x) + { /* make a non-volatile copy */ T v(x); + /* pass the copy along */ return io::detail::feed<CharT, Tr, Alloc, T&>(*this, v); } +#endif + #if defined(__GNUC__) // GCC can't handle anonymous enums without some help // ** arguments passing ** // |