Update of /cvsroot/boost/boost/boost/optional
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24718
Modified Files:
Tag: RC_1_34_0
optional.hpp
Log Message:
in_palce_factory.apply problem fixed
Index: optional.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/optional/optional.hpp,v
retrieving revision 1.9.2.4
retrieving revision 1.9.2.5
diff -u -d -r1.9.2.4 -r1.9.2.5
--- optional.hpp 1 Mar 2007 23:08:33 -0000 1.9.2.4
+++ optional.hpp 7 Mar 2007 20:17:23 -0000 1.9.2.5
@@ -76,6 +76,19 @@
#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
#endif
+// Daniel Wallin discovered that bind/apply.hpp badly interacts with the
apply<>
+// member template of a factory as used in the optional<> implementation.
+// He proposed this simple fix which is to move the call to apply<> outside
+// namespace boost.
+namespace boost_optional_detail
+{
+ template <class T, class Factory>
+ void construct(Factory const& factory, void* address)
+ {
+ factory.BOOST_NESTED_TEMPLATE apply<T>(address);
+ }
+}
+
namespace boost {
@@ -309,7 +322,7 @@
void construct ( Expr const& factory, in_place_factory_base const* )
{
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value
) ;
- factory.BOOST_NESTED_TEMPLATE apply<value_type>(m_storage.address()) ;
+ boost_optional_detail::construct<value_type>(factory,
m_storage.address());
m_initialized = true ;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs