Boost logo

Boost Users :

Subject: [Boost-users] [smart_ptr] forward instead of including shared_ptr.hpp
From: Rune Lund Olesen (rune.olesen_at_[hidden])
Date: 2012-10-11 09:01:28


Hello all

Anyone got an opinion on this.

I looked in boost, and there doesn't seem to be forwards for this.

Suppose I am writing my .h file, instead of including shared_ptr.hpp i
could just forward it using the following:

namespace boost {
template <class T> class smart_ptr<T>;
}

My concern is compilation time, as im going to do this in 1000+ .h files.

If, in the user code, the function returning smart_ptr is not used, this
could save some compilation time, but then again is that enough to justify
a forward ?

Regards

Rune



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net