Re: [Barry-devel] New tool: btarcmp (and other news)
Status: Beta
Brought to you by:
ndprojects
From: Chris F. <cd...@fo...> - 2012-01-24 21:35:06
|
On Tue, Jan 24, 2012 at 01:23:47PM +0000, Toby Gray wrote: > QNX gave an error with some of the overloads in FieldValueHandlerBase. > The problem appears to be that std::time_t on QNX is just a typedef for > std::uint32_t, where as on my linux system time_t is "long int". I can't > think of a solution which doesn't: > a) require templates (which would defeat the point of FieldValueHandlerBase) > b) require the explicit mention of every possible integer type (which is > not nice as it would require fiddling with where time_t is used in > places like r_calendar to avoid ambiguous overload calls) > c) switch to using something like boost::variant, requiring boost to > compile Barry (which would mean finding ports of Boost for Android and QNX) > > Do you have any thoughts on any other alternatives? Good catch! Thanks. There's the d) option of creating a struct BarryTimeT which just wraps time_t. This might allow for useful functions to be attached to our time type as well. What do you think? - Chris |