Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16287/src/libopenvrml/openvrml
Modified Files:
Tag: OpenVRML-0_16-BRANCH
vrml97node.cpp
Log Message:
ScopeGuard as initially described by Alexandrescu and Marginean copies the callback function parameters to the guard implementation. This means that the callback is called with the values given when make_guard gets called--not whatever the values might be when execution in the scope completes.
This changes OpenVRML's implementation of ScopeGuard to keep const references to the parameters in the guard implementation. Also, use of boost::multi_index::detail::scope_guard (where use of OpenVRML's ScopeGuard implementation is inconvenient) now explicitly gives a reference template parameter to the instantiation of make_guard to circumvent this problem.
Index: vrml97node.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v
retrieving revision 1.108.2.6
retrieving revision 1.108.2.7
diff -C2 -d -r1.108.2.6 -r1.108.2.7
*** vrml97node.cpp 28 Dec 2006 23:10:59 -0000 1.108.2.6
--- vrml97node.cpp 2 Jan 2007 00:07:29 -0000 1.108.2.7
***************
*** 39,43 ****
# include <boost/algorithm/string/predicate.hpp>
# include <boost/array.hpp>
- # include <boost/multi_index/detail/scope_guard.hpp>
# include <boost/thread.hpp>
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
--- 39,42 ----
***************
*** 69,73 ****
using namespace openvrml;
using namespace openvrml::node_impl_util;
- using namespace boost::multi_index::detail; // for scope_guard
/**
--- 68,71 ----
|