| commit | 7cb72c96b4d5ede1b5526a526ccb7dae0490bb0e | [log] [tgz] | 
|---|---|---|
| author | Bernie Innocenti <codewiz@google.com> | Thu Mar 28 15:32:37 2019 +0900 | 
| committer | Bernie Innocenti <codewiz@google.com> | Thu Mar 28 15:56:07 2019 +0900 | 
| tree | 56b2f8df63e73b5502e5343bb03e38147b9b433f | |
| parent | 7f43e9fa40d5440f77a9a0b46edaad9d1b69bd8a [diff] | 
Disallow operator!() on unique_fd
This catches a common mistake where client code checks for errors using
the common idiom that works for std::iostream and other file-like
classes:
  unique_fd fd = open(...);
  if (!fd) {
  }
Test: atest libbase_test
Test: m droid
Change-Id: I9629a7795537ecb3b57be9c741c06f80967e4cc2