|
Boost : |
Subject: [boost] [exception][msvc-7.1] regression and use of member template friends
From: JOAQUIN M. LOPEZ MUÑOZ (joaquin_at_[hidden])
Date: 2010-02-21 13:39:34
Hi,
In its current state in trunk, boost/exception/exception.hpp is generating
regressions with MSVC 7.1 as shown in:
The problem has to do with some (correct) member template friends
declarations that MSVC 7.1 is not able to handle.
Lines 222 and ff. of boost/exception/exception.hpp read:
#if defined(__MWERKS__) && __MWERKS__<=0x3207
public:
#else
private:
template <class E>
friend E const & exception_detail::set_info( E const &, throw_function const & );
[...]
To solve the problem the nicest solution would be to replace this by:
#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
public:
#else
private:
template <class E>
friend E const & exception_detail::set_info( E const &, throw_function const & );
[...]
But exception.hpp, presumably to speed up compilation times, does not
include any other header, so seems like including <boost/config.hpp> just
to get this macro could be unacceptable. If this is the case, I suggest that the
code be changed so as to simply go public and omit the member template
friend declarations altogether.
Thank you,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk