
10 Nov
2007
10 Nov
'07
1:19 p.m.
The file boost/test/impl/debug.ipp contains the function prepare_window_title, which contains this line (317): ::snprintf( title_str, sizeof(title_str), "%*s %ld", dsi.binary_path.end()-it, it, dsi.pid ); There are two potential problems here. One, the length specification of "%*s" must be an int, but the difference_type of the iterator is ptrdiff_t, which is a long int. That's a different size on a GCC-compiled 64-bit system and will cause problems. Two, is it safe to say that basic_cstring::iterator (the type of 'it') will always be a pointer? No debug iterator will ever be used? Sebastian Redl