boostorg / boostorg/logic

tribool doesn't play well with auto

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
12
Forks
41
PR merge metrics
No merged PRs in 30d

Description

This prints "Not true.":
```
tribool b = indeterminate;
if(b) {
cout << boolalpha << b << endl;
}
else {
cout << "Not true." << endl;
}
```
This prints "indeterminate":
```
auto b = indeterminate;
if(b) {
cout << boolalpha << b << endl;
}
else {
cout << "Not true." << endl;
}
```
Is it a bug? Or is it expected behavior? What's the rationale?

Thanks!

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.