[Boost-bugs] [Boost C++ Libraries] #6960: unnecessary dependency on boost.date_time when building with separate compilation

Subject: [Boost-bugs] [Boost C++ Libraries] #6960: unnecessary dependency on boost.date_time when building with separate compilation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-03 04:58:37


#6960: unnecessary dependency on boost.date_time when building with separate
compilation
------------------------------+---------------------------------------------
 Reporter: arvid@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.46.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 The time_queue.hpp header file, in addition to defining the template, also
 defines one instantiation of it using boost::posix_time::ptime as the time
 type. This instantiation is then implemented in impl/timer_queue.ipp. This
 definition is only visible when building asio with the separate
 compilation option.

 If a client never uses the date_time ptime type, nor its clock, this
 results in an unnecessary dependency on boost.date_time (at least on
 windows, possibly because the gregorian::date_type constructor needs to be
 resolved at link-time). Simply commenting the extra instantiation solves
 the problem (i.e. removes the dependency on boost.date_time).

 I would suggest simply removing this explicit instantiation of the
 timer_queue template when building with separate compilation. From what I
 can tell, that would not cause any serious problems for any other use.
 Building with headers-only would not be affected at all, and building with
 separate compilation and actually using the boost::posix_time::ptime
 time_trait, it would just be instantiated automatically anyway, just like
 when using headers-only.

 I marked this as boost 1.46.0 because that's what I'm testing with on
 windows., but from what I can tell, this is still a problem in 1.49.0,
 since timer_queue_ptime.hpp is included in src.hpp

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6960>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC