|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72003 - trunk/boost/property_tree/detail
From: sebastian.redl_at_[hidden]
Date: 2011-05-16 18:05:08
Author: cornedbee
Date: 2011-05-16 18:05:08 EDT (Mon, 16 May 2011)
New Revision: 72003
URL: http://svn.boost.org/trac/boost/changeset/72003
Log:
Try to work around MSVC name lookup bug. See bug 5281.
Text files modified:
trunk/boost/property_tree/detail/rapidxml.hpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Modified: trunk/boost/property_tree/detail/rapidxml.hpp
==============================================================================
--- trunk/boost/property_tree/detail/rapidxml.hpp (original)
+++ trunk/boost/property_tree/detail/rapidxml.hpp 2011-05-16 18:05:08 EDT (Mon, 16 May 2011)
@@ -369,8 +369,9 @@
public:
//! \cond internal
- typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory
- typedef void (free_func)(void *); // Type of user-defined function used to free memory
+ // Prefixed names to work around weird MSVC lookup bug.
+ typedef void *(boost_ptree_raw_alloc_func)(std::size_t); // Type of user-defined function used to allocate memory
+ typedef void (boost_ptree_raw_free_func)(void *); // Type of user-defined function used to free memory
//! \endcond
//! Constructs empty pool with default allocator functions.
@@ -536,7 +537,7 @@
//! </code><br>
//! \param af Allocation function, or 0 to restore default function
//! \param ff Free function, or 0 to restore default function
- void set_allocator(alloc_func *af, free_func *ff)
+ void set_allocator(boost_ptree_raw_alloc_func *af, boost_ptree_raw_free_func *ff)
{
BOOST_ASSERT(m_begin == m_static_memory && m_ptr == align(m_begin)); // Verify that no memory is allocated yet
m_alloc_func = af;
@@ -617,8 +618,8 @@
char *m_ptr; // First free byte in current pool
char *m_end; // One past last available byte in current pool
char m_static_memory[BOOST_PROPERTY_TREE_RAPIDXML_STATIC_POOL_SIZE]; // Static raw memory
- alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used
- free_func *m_free_func; // Free function, or 0 if default is to be used
+ boost_ptree_raw_alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used
+ boost_ptree_raw_free_func *m_free_func; // Free function, or 0 if default is to be used
};
///////////////////////////////////////////////////////////////////////////
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk