Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

irange makes non-emtpy ranges when first is greater than last

オープン
#76 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
cpp
領域
tooling

調査の方向性

irange.hpp の 210 行目と 219 行目付近にあるアサーションから始め、既存の test_irange ケースを確認します。報告された呼び出しが反復せずに空の範囲を生成することを検証し、これらのケースが反復回数 0 で完了するようにテストを追加または更新します。

索引モデルが issue の本文から書いたものです。

説明

the simple example irange(-5) I would expect to be an empty range, i.e.

int32_t end   = -5;
int64_t count = 0;
for (int32_t i = 0; i < end; ++i)
    // this line will never be reached
    ++count;
std::cout << count << std::endl; // 0

count = 0;
for (auto i : boost::irange(end))
    // this should never be reached, but it will 
    // iterate past int32_t max until it reaches -5
    ++count;
std::cout << count << std::endl; // 4294967291

My expectations is the following tests should pass with no iterations, but many fail on asserts in the test but will be large ranges in release

test_irange(-5);
test_irange(0, -5); // this fails on assert at irange.hpp#L210
test_irange(5, 10, -1); // this fails on assert at irange.hpp#L219
test_irange(10, 5, 1); // this fails on assert at irange.hpp#L219
主要言語
C++
スター
45
フォーク
104
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

boostorg/range のほかの issue

boostorg/range の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。