From 760f2e15ce8a29e6e6895d02befc047b84b29ac7 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Tue, 1 Oct 2013 16:45:36 -0700 Subject: [PATCH] feat(library/replace_using_ctx): add static_assert --- src/library/replace_using_ctx.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/library/replace_using_ctx.h b/src/library/replace_using_ctx.h index db3f6931b..246f68b86 100644 --- a/src/library/replace_using_ctx.h +++ b/src/library/replace_using_ctx.h @@ -26,6 +26,10 @@ template class replace_using_ctx_fn { static_assert(std::is_same::type, expr>::value, "replace_using_ctx_fn: return type of F is not expr"); + // the return type of P()(e1, e2) should be void + static_assert(std::is_same())(expr const &, expr const &)>::type, + void>::value, + "The return type of P()(e1, e2) is not void"); typedef scoped_map cache; cache m_cache; F m_f;