Sha256: aabdcec1cc35e9ea4614db019fa5c4a4992205b5a3cdf67ab96449a6071a4fe9
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
// Copyright Joakim Karlsson & Kim Gräsman 2010-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef IGLOO_CONSTRAINTADAPTER_H #define IGLOO_CONSTRAINTADAPTER_H namespace snowhouse { template <typename ConstraintType> struct ConstraintAdapter { ConstraintAdapter(const ConstraintType& constraint) : m_constraint(constraint) { } template <typename ConstraintListType, typename ActualType> void Evaluate(ConstraintListType& list, ResultStack& result, OperatorStack& operators, const ActualType& actual) { result.push(m_constraint(actual)); EvaluateConstraintList(list.m_tail, result, operators, actual); } ConstraintType m_constraint; }; template<typename ConstraintType> struct Stringizer< ConstraintAdapter<ConstraintType> > { static std::string ToString(const ConstraintAdapter<ConstraintType>& constraintAdapter) { return snowhouse::Stringize(constraintAdapter.m_constraint); } }; } #endif
Version data entries
2 entries across 2 versions & 1 rubygems