Пример #1
0
    void walk_vec(bool is_pod, uint16_t sp_size) {
        if (is_pod || shape::get_dp<void *>(dp) == NULL)
            return;     // There can't be any outbound pointers from this.

        std::pair<uint8_t *,uint8_t *> data_range(get_vec_data_range(dp));
        if (data_range.second - data_range.first > 100000)
            abort();    // FIXME: Temporary sanity check.

        irc sub(*this, data_range.first);
        shape::ptr data_end = sub.end_dp = data_range.second;
        while (sub.dp < data_end) {
            sub.walk_reset();
            align = true;
        }
    }
Пример #2
0
	void test()
	{
		int data[5] = {0, 1, 2, 3, 4};
		int search_array[2] = {0, 4};
		const int const_search_array[2] = {0, 4};

		range<int> data_range(data, 5);
		range<const int> const_data_range= data_range;

		range<int> search_range(data, 2);
		range<const int> const_search_range(data, 2);
		
		find_first_of(data_range, 2);
		find_first_of(data_range, search_range);
		find_first_of(data_range, const_search_range);
		find_first_of(data_range, search_array);
		find_first_of(data_range, const_search_array);

		find_first_of(const_data_range, 2);
		find_first_of(const_data_range, search_range);
		find_first_of(const_data_range, const_search_range);
		find_first_of(const_data_range, search_array);
		find_first_of(const_data_range, const_search_array);


		find_last_of(data_range, 2);
		find_last_of(data_range, search_range);
		find_last_of(data_range, const_search_range);
		find_last_of(data_range, search_array);
		find_last_of(data_range, const_search_array);

		find_last_of(const_data_range, 2);
		find_last_of(const_data_range, search_range);
		find_last_of(const_data_range, const_search_range);
		find_last_of(const_data_range, search_array);
		find_last_of(const_data_range, const_search_array);

		
		// range algorithms
		
	}