Boost C++ 库

...世界上最受推崇和设计精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu,《C++ 编码规范

函数 require_match - Boost C++ 函数库
PrevUpHomeNext

函数 require_match

boost::type_erasure::require_match

提要

// In header: <boost/type_erasure/require_match.hpp>


template<typename Concept, typename Op, class... U> 
  void require_match(const binding< Concept > & binding, const Op & f, 
                     U &&... args);
template<typename Op, class... U> 
  void require_match(const Op & f, U &&... args);

描述

检查所有 any 参数中实际存储的类型是否与 binding 指定的类型匹配。如果不匹配,则

如果未指定 binding,则将从参数中推断出来。

后置条件

call(binding, f, args...) 是有效的。


PrevUpHomeNext