| 210 | | return sign_inserter::call(sink, traits::test_zero(attr) |
| 211 | | , traits::test_negative(attr), force_sign) && |
| | 210 | // For unknown reasons, the attr value is not passed |
| | 211 | // correctly to traits::get_absolute_value() if it is not |
| | 212 | // previously copied into a temporary variable. Seth |
| | 213 | // Heeren <bugs at sehe.nl> et Jeroen Habraken |
| | 214 | // <vexocide at gmail.com> from the Boost.Spirit general |
| | 215 | // mailing list suspect a compiler error (which would be |
| | 216 | // surprisingly present in g++ and clang++, but is not |
| | 217 | // observed in MSVC) or a subtle case of undefined |
| | 218 | // behavior in C++. |
| | 219 | Attribute attr_copy(attr); |
| | 220 | return sign_inserter::call(sink, traits::test_zero(attr_copy) |
| | 221 | , traits::test_negative(attr_copy), force_sign) && |
| 213 | | , traits::get_absolute_value(attr)); |
| | 223 | , traits::get_absolute_value(attr_copy)); |
| | 224 | // // The original code without the workaround: |
| | 225 | // return sign_inserter::call(sink, traits::test_zero(attr) |
| | 226 | // , traits::test_negative(attr), force_sign) && |
| | 227 | // int_inserter<Radix, CharEncoding, Tag>::call(sink |
| | 228 | // , traits::get_absolute_value(attr)); |