本文整理汇总了C++中strong_type类的典型用法代码示例。如果您正苦于以下问题:C++ strong_type类的具体用法?C++ strong_type怎么用?C++ strong_type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了strong_type类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check
void check(T const& x, strong_type const& strong) const {
std::string scope(test::scope);
if(scope.find("hash::operator()") == std::string::npos)
strong.test(x, test::exception::detail::tracker.count_allocations);
test::check_equivalent_keys(x);
}
示例2: run
void run(T& x, strong_type& strong) const {
for(BOOST_DEDUCED_TYPENAME test::random_values<T>::const_iterator
it = this->values.begin(), end = this->values.end(); it != end; ++it)
{
strong.store(x, test::exception::detail::tracker.count_allocations);
x.insert(x.begin(), *it);
}
}
示例3: BOOST_PREVENT_MACRO_SUBSTITUTION
void check BOOST_PREVENT_MACRO_SUBSTITUTION(
T const& x, strong_type const& strong) const
{
std::string scope(test::scope);
if(scope.find("hash::operator()") == std::string::npos)
strong.test(x, test::detail::tracker.count_allocations);
test::check_equivalent_keys(x);
}
示例4: check
void check(T const& x, strong_type const& strong) const {
std::string scope(test::scope);
if(scope.find("hash::operator()") == std::string::npos &&
scope.find("equal_to::operator()") == std::string::npos &&
scope != "operator==(object, object)")
strong.test(x);
test::check_equivalent_keys(x);
}
示例5: BOOST_PREVENT_MACRO_SUBSTITUTION
void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x,
strong_type const& strong) const
{
std::string scope(test::scope());
if(scope.find("hash::operator()") == std::string::npos &&
scope.find("equal_to::operator()") == std::string::npos &&
scope != "operator==(object, object)")
strong.test(x);
test::check_equivalent_keys(x);
}