Sha256: 29f7ec09e20416a57abe6012a43628eccda2944ef9bc8ed2268837da62aa2567
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 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_NOTEXPRESSION_H #define IGLOO_NOTEXPRESSION_H #include "./expression_fwd.h" namespace snowhouse { template< typename ExpressionType > struct NotExpression : Expression< NotExpression<ExpressionType> > { NotExpression(const ExpressionType& expression) : m_expression(expression) { } template<typename ActualType> bool operator()(const ActualType& actual) const { return !m_expression(actual); } ExpressionType m_expression; }; template< typename ExpressionType > struct Stringizer< NotExpression<ExpressionType> > { static std::string ToString(const NotExpression<ExpressionType>& expression) { std::ostringstream builder; builder << "not " << snowhouse::Stringize(expression.m_expression); return builder.str(); } }; } #endif
Version data entries
2 entries across 2 versions & 1 rubygems