Leon Mergen wrote:
Hello,
Hi, sorry for the slow reply...
I'm using GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9), and the time_duration class was generating the following warning for me:
/usr/local/include/boost/boost/date_time/time_duration.hpp:58: warning: control may reach end of non-void function
I've heard that I wasn't the first person with this problem, and well, since I like my code to compile clean (treat warnings as errors), this was preventing me to do so.
Apparently GCC had some troubles with seeing that the static tick_type to_tick_count () function defined at time_resolution_traits.hpp was always returning something. Simply moving the code inside the else {} block to the end of the function made GCC confident that the function was indeed always returning something. Looks more like a GCC bug, but here's the patch:
I'll try to apply the patch in the near future -- I'll let you know when I do. However, please submit a gcc bug as this is clearly a compiler bug. Jeff