当前位置: 首页>>代码示例>>C++>>正文


C++ test::random_values类代码示例

本文整理汇总了C++中test::random_values的典型用法代码示例。如果您正苦于以下问题:C++ random_values类的具体用法?C++ random_values怎么用?C++ random_values使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了random_values类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: create

 T create(test::random_values<T> const& v,
         test::object_count& count,
         BOOST_DEDUCED_TYPENAME T::hasher hf,
         BOOST_DEDUCED_TYPENAME T::key_equal eq,
         BOOST_DEDUCED_TYPENAME T::allocator_type al,
         float mlf) {
     T x(0, hf, eq, al);
     x.max_load_factor(mlf);
     x.insert(v.begin(), v.end());
     count = test::global_object_count;
     return x;
 }
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:12,代码来源:move_tests.cpp

示例2: hasher

 swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
     : x_values(count1), y_values(count2),
     initial_x(x_values.begin(), x_values.end(), 0, hasher(tag1),
             key_equal(tag1), allocator_type(tag1)),
     initial_y(y_values.begin(), y_values.end(), 0, hasher(tag2),
             key_equal(tag2), allocator_type(tag2))
 {}
开发者ID:CASL,项目名称:vera_tpls,代码行数:7,代码来源:swap_exception_tests.cpp

示例3: hasher

 swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2)
     : x_values(count1), y_values(count2),
     initial_x(x_values.begin(), x_values.end(), 0, hasher(tag1),
             key_equal(tag1), allocator_type(tag1)),
     initial_y(y_values.begin(), y_values.end(), 0, hasher(tag2),
             key_equal(tag2), allocator_type(
                 T::allocator_type::propagate_on_container_swap::value ?
                     tag2 : tag1))
 {}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:9,代码来源:swap_exception_tests.cpp

示例4: BOOST_PREVENT_MACRO_SUBSTITUTION

    void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x1) const
    {
        test::check_equivalent_keys(x1);

        // If the container is empty at the point of the exception, the
        // internal structure is hidden, this exposes it.
        T& y = const_cast<T&>(x1);
        if (x_values.size()) {
            y.emplace(*x_values.begin());
            test::check_equivalent_keys(y);
        }
    }
开发者ID:skarupke,项目名称:sherwood_map,代码行数:12,代码来源:assign_exception_tests.cpp

示例5: x

 assign_base(unsigned int count1, unsigned int count2, int tag1, int tag2,
             float mlf1 = 0.85, float mlf2 = 0.85) :
     x_values(count1),
     y_values(count2),
     x(x_values.begin(), x_values.end(), 0, hasher(tag1), key_equal(tag1),
       allocator_type(tag1)),
     y(y_values.begin(), y_values.end(), 0, hasher(tag2), key_equal(tag2),
       allocator_type(tag2))
 {
     x.max_load_factor(mlf1);
     y.max_load_factor(mlf2);
 }
开发者ID:skarupke,项目名称:sherwood_map,代码行数:12,代码来源:assign_exception_tests.cpp

示例6: init

 data_type init() const {
     T x(values.begin(), values.end(), n);
     return x;
 }
开发者ID:skarupke,项目名称:sherwood_map,代码行数:4,代码来源:rehash_exception_tests.cpp

示例7: init

 T init() const { return T(values.begin(), values.end()); }
开发者ID:CASL,项目名称:vera_tpls,代码行数:1,代码来源:swap_exception_tests.cpp

示例8: values

 copy_with_allocator_test() : values(100), x(values.begin(), values.end()) {}
开发者ID:skarupke,项目名称:sherwood_map,代码行数:1,代码来源:copy_exception_tests.cpp

示例9: values

 copy_test3a()
     : values(100, test::limited_range), x(values.begin(), values.end())
 {
 }
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:4,代码来源:copy_exception_tests.cpp


注:本文中的test::random_values类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。