boostorg / boostorg/ublas

Fixing iteration-type of for-loop.

Open
#165 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
122
Forks
151
PR merge metrics
No merged PRs in 30d

Description

The current loops rely on `auto` deduction or integer suffix for the type that may not be a correct iteration type and may produce conversion warnings all over places. Therefore, I propose to remove `auto` from the loops and use appropriate and explicit types or use explicit types to initialize the variable. In a long run, it would produce a bug-free code, and it would remove all warnings produced by compilers.

From
```cpp
for(auto d = 0u; d < t.size(); ++d)
{
...
}
```

To
```cpp
for(auto d = size_type{0}; d < t.size(); ++d)
{
...
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.