|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71717 - trunk/boost/xpressive
From: dgregor_at_[hidden]
Date: 2011-05-04 13:04:31
Author: dgregor
Date: 2011-05-04 13:04:30 EDT (Wed, 04 May 2011)
New Revision: 71717
URL: http://svn.boost.org/trac/boost/changeset/71717
Log:
Fix a standards-conformance issue where Xpressive is attempting to
construct an incomplete type (detail::ReplaceAlgo) within a template
definition. This is ill-formed, but only Clang seems to diagnose the
issue.
Text files modified:
trunk/boost/xpressive/match_results.hpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Modified: trunk/boost/xpressive/match_results.hpp
==============================================================================
--- trunk/boost/xpressive/match_results.hpp (original)
+++ trunk/boost/xpressive/match_results.hpp 2011-05-04 13:04:30 EDT (Wed, 04 May 2011)
@@ -938,7 +938,10 @@
, mpl::size_t<4>
) const
{
- return this->format2_(out, detail::ReplaceAlgo()(format, 0, *this));
+ // detail::ReplaceAlgo may be an incomplete type at this point, so
+ // we can't construct it directly.
+ typedef typename mpl::if_c<true, detail::ReplaceAlgo, OutputIterator>::type ReplaceAlgo;
+ return this->format2_(out, ReplaceAlgo()(format, 0, *this));
}
/// INTERNAL ONLY
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