|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66197 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2010-10-25 19:57:17
Author: eric_niebler
Date: 2010-10-25 19:57:16 EDT (Mon, 25 Oct 2010)
New Revision: 66197
URL: http://svn.boost.org/trac/boost/changeset/66197
Log:
optimize boost::tr1_result_of for default_domain and default_generator
Text files modified:
trunk/boost/proto/generate.hpp | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
Modified: trunk/boost/proto/generate.hpp
==============================================================================
--- trunk/boost/proto/generate.hpp (original)
+++ trunk/boost/proto/generate.hpp 2010-10-25 19:57:16 EDT (Mon, 25 Oct 2010)
@@ -12,6 +12,7 @@
#define BOOST_PROTO_GENERATE_HPP_EAN_02_13_2007
#include <boost/config.hpp>
+ #include <boost/version.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/facilities/intercept.hpp>
@@ -369,7 +370,8 @@
}}
- // Specialization of boost::result_of to eliminate some unnecessary template instantiations
+ // Specializations of boost::result_of and boost::tr1_result_of to eliminate
+ // some unnecessary template instantiations
namespace boost
{
template<typename Expr>
@@ -383,6 +385,20 @@
{
typedef Expr type;
};
+
+ #if BOOST_VERSION >= 104400
+ template<typename Expr>
+ struct tr1_result_of<proto::default_domain(Expr)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr>
+ struct tr1_result_of<proto::default_generator(Expr)>
+ {
+ typedef Expr type;
+ };
+ #endif
}
#endif // BOOST_PROTO_GENERATE_HPP_EAN_02_13_2007
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