On Thursday, December 22, 2011 21:30:46 Walter Bright wrote: > On 12/22/2011 7:13 PM, Jonathan M Davis wrote: > > Okay. Assuming that I'm going to try and make TimeZone opaque within > > SysTime, does that require a pointer rather than a reference? And I > > assume then that the time zone stuff would need to be in a separate > > module than SysTime. That being the case, how would SysTime be able to > > use the time zone without importing that module? Does the C++ solution > > of forward declaring it like > > > > class TimeZone; > > > > work in D? > > It'll still put a reference to TimeZone in the ModuleInfo.
Will that still happen if the TimeZone is used in templated functions? SysTime has several functions that use TimeZone explicitly - e.g. the timezone property. It needs to be able to take and return a TimeZone. However, it _could_ be templatized with an empty template parameter list. Would that avoid pulling in the information on TimeZone if those functions aren't instantiated? Or would it still pull it in? - Jonathan M Davis