@@ -67,7 +67,20 @@ using std::min;
6767#include < string>
6868#include < vector>
6969#include < list>
70- #include < boost/tr1/memory.hpp>
70+
71+ #include < boost/version.hpp>
72+ #if BOOST_VERSION < 106500
73+ // Pulling in smart pointers is easy with Boost versions prior to 1.65.0, with the
74+ // `boost/tr1/*.hpp` set of headers simply pulling in whatever is available (C++11, TR1 or
75+ // boost's own implementation) and making it available in the `std::tr1` namespace.
76+ #include < boost/tr1/memory.hpp>
77+ #define POV_TR1_NAMESPACE std::tr1
78+ #else
79+ // With `boost/tr1/*.hpp` unavailable, we're currently blindly relying on the compiler to
80+ // be compliant with C++11.
81+ #include < memory>
82+ #define POV_TR1_NAMESPACE std
83+ #endif
7184
7285// when we say 'string' we mean std::string
7386using std::string;
@@ -83,8 +96,12 @@ using std::list;
8396using std::runtime_error;
8497
8598// these may actually be the boost implementations, depending on what boost/tr1/memory.hpp has pulled in
86- using std::tr1::shared_ptr;
87- using std::tr1::weak_ptr;
99+ // (NOTE: If you're running into a compile error here, you're probably trying to compile POV-Ray
100+ // for Windows with Boost 1.65.0 or later and a non-C++11-compliant compiler. We currently do not
101+ // support such a combination. Please use the Boost version that came bundled with the POV-Ray
102+ // source code.)
103+ using POV_TR1_NAMESPACE::shared_ptr;
104+ using POV_TR1_NAMESPACE::weak_ptr;
88105
89106#endif // STD_POV_TYPES_DECLARED
90107
0 commit comments