boostorg / boostorg/test

Using BOOST_REQUIRE () should not cause "comparison of integers of different" warning

Open
#207 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
213
Forks
149
Avg merge
18h 17m
Merged PRs (30d)
2

Description

Hi! When I use BOOST_TEST_REQUIRE(==) the compiler generates "comparison of integers of different" warnings, but without BOOST_*() macros everything is compiled silently even with -Wall -Wextra.

```C++

#include

#include

bool foo(std::vector& v) {
BOOST_TEST_REQUIRE(v.size() == 0); // warning: comparison of integers of different signs: 'const unsigned long' and 'const int'
return v.size() == 0; // Okay
}
```

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.