Skip to content

Commit

Permalink
chore: silence Visual Studio 2022 (17.3.0) warning
Browse files Browse the repository at this point in the history
without the following warning is emitted:

```
include\function2\function2.hpp(1176): warning C4305: '<function-style-cast>': truncation from 'bool (__cdecl *)(void)' to 'bool'
```
  • Loading branch information
gjasny authored and Naios committed Aug 17, 2022
1 parent f569a63 commit 2d3a878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/function2/function2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ class erasure : internal_capacity_holder<typename Config::capacity> {
FU2_DETAIL_CXX14_CONSTEXPR erasure(std::true_type /*use_bool_op*/,
T&& callable,
Allocator&& allocator_ = Allocator{}) {
if (bool(callable)) {
if (!!callable) {
vtable_t::init(vtable_,
type_erasure::make_box(
std::integral_constant<bool, Config::is_copyable>{},
Expand Down

0 comments on commit 2d3a878

Please sign in to comment.