diff --git a/testing/counting_iterator.cu b/testing/counting_iterator.cu index eede510fc..ebefe4d64 100644 --- a/testing/counting_iterator.cu +++ b/testing/counting_iterator.cu @@ -8,6 +8,14 @@ THRUST_DISABLE_MSVC_POSSIBLE_LOSS_OF_DATA_WARNING_BEGIN +template +void TestCountingDefaultConstructor(void) +{ + thrust::counting_iterator iter0; + ASSERT_EQUAL(*iter0, T{}); +} +DECLARE_GENERIC_UNITTEST(TestCountingDefaultConstructor); + void TestCountingIteratorCopyConstructor(void) { thrust::counting_iterator iter0(100); diff --git a/thrust/iterator/counting_iterator.h b/thrust/iterator/counting_iterator.h index a7ef2ec7c..f66cb97ef 100644 --- a/thrust/iterator/counting_iterator.h +++ b/thrust/iterator/counting_iterator.h @@ -144,11 +144,11 @@ template