ZeroErr
载入中...
搜索中...
未找到
decomposition.h 文件参考
#include "zeroerr/internal/config.h"
#include "zeroerr/dbg.h"
#include "zeroerr/print.h"
decomposition.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

类

struct  zeroerr::deferred_false< T >
 
struct  zeroerr::ExprResult
 
struct  zeroerr::details::has_bool_conversion< T, typename >
 
struct  zeroerr::details::has_bool_conversion< T, decltype(static_cast< bool >(std::declval< T >()), void())>
 
struct  zeroerr::Expression< L >
 
struct  zeroerr::ExpressionDecomposer
 
class  zeroerr::IMatcher< T >
 
class  zeroerr::IMatcherRef< T >
 
class  zeroerr::CombinedMatcher< T >
 
class  zeroerr::NotMatcher< T >
 
struct  zeroerr::StartWithMatcher< T >
 

命名空间

namespace  zeroerr
 
namespace  zeroerr::details
 

宏定义

#define AND   &&zeroerr::ExpressionDecomposer() <<
 
#define OR   || zeroerr::ExpressionDecomposer() <<
 
#define ZEROERR_SFINAE_OP(ret, op)    typename std::decay<decltype(std::declval<L>() op std::declval<R>(), std::declval<ret>())>::type
 
#define ZEROERR_EXPRESSION_COMPARISON(op, op_name)
 
#define ZEROERR_EXPRESSION_ANDOR(op, op_name)
 
#define ZEROERR_FORBIT_EXPRESSION(rt, op)
 

函数

template<typename T >
std::enable_if< has_bool_conversion< T >::value, bool >::type zeroerr::details::getBool (T &&lhs)
 
template<typename T >
std::enable_if<!has_bool_conversion< T >::value, bool >::type zeroerr::details::getBool (T &&)
 
template<typename T >
std::enable_if< std::is_constructible< zeroerr::String, T >::value, IMatcherRef< zeroerr::String > >::type zeroerr::start_with (T &&s)
 

宏定义说明

◆ AND

#define AND   &&zeroerr::ExpressionDecomposer() <<

AND and OR are used to combine expressions in a more readable way. For example: CHECK(1 == 1 AND 2 == 2);

In its implementation, the expression is decomposed to ExpressionDecomposer() << 1 == 1 && ExpressionDecomposer() << 2 == 2

◆ OR

#define OR   || zeroerr::ExpressionDecomposer() <<

◆ ZEROERR_EXPRESSION_ANDOR

#define ZEROERR_EXPRESSION_ANDOR (   op,
  op_name 
)
值:
ExprResult operator op(ExprResult rhs) { \
return ExprResult(res op rhs.res, \
detail::joinDiagnostic(decomp, " " #op " ", rhs.decomp)); \
}

◆ ZEROERR_EXPRESSION_COMPARISON

#define ZEROERR_EXPRESSION_COMPARISON (   op,
  op_name 
)
值:
template <typename R> \
ZEROERR_DIAGNOSTIC_NOINLINE ZEROERR_SFINAE_OP(Expression<R>, op) operator op(R&& rhs) { \
zeroerr::String text = \
detail::comparisonText(decomp, detail::makeDiagnosticValue(lhs), " " #op " ", \
detail::makeDiagnosticValue(rhs), res); \
return Expression<R>(static_cast<R&&>(rhs), res && (lhs op rhs), std::move(text)); \
} \
template <typename R, \
typename std::enable_if<!std::is_rvalue_reference<R>::value, void>::type* = nullptr> \
ZEROERR_DIAGNOSTIC_NOINLINE ZEROERR_SFINAE_OP(Expression<const R&>, op) operator op( \
const R& rhs) { \
zeroerr::String text = \
detail::comparisonText(decomp, detail::makeDiagnosticValue(lhs), " " #op " ", \
detail::makeDiagnosticValue(rhs), res); \
return Expression<const R&>(rhs, res && (lhs op rhs), std::move(text)); \
}
Definition string.h:41
#define ZEROERR_SFINAE_OP(ret, op)
Definition decomposition.h:28
#define ZEROERR_DIAGNOSTIC_NOINLINE
Definition text.h:15

◆ ZEROERR_FORBIT_EXPRESSION

#define ZEROERR_FORBIT_EXPRESSION (   rt,
  op 
)
值:
template <typename R> \
rt& operator op(const R&) { \
static_assert(deferred_false<R>::value, \
"Please Rewrite Expression As Binary Comparison!"); \
return *this; \
}

◆ ZEROERR_SFINAE_OP

#define ZEROERR_SFINAE_OP (   ret,
  op 
)     typename std::decay<decltype(std::declval<L>() op std::declval<R>(), std::declval<ret>())>::type