find is not boolean, you should check against string::nopos or whatever it is.
strstr is effectively boolean, because nullptr == 0, but c++ strings do not expose their pointers and for some unholy reason npos isnt 0 so they had to make the find kludgy.
you don't need all that bloat either, just say something like
found |= (line.find(valid) != string::npos) ... trivial operations like bool assignment are so cheap that the extra comparison and jump of the if statement is actually less efficient (on top of being more wordy) than just assignment each iteration.
if you trust the file to not have crap in it, you can also use == instead of find()
Contains would be welcome, that was a big miss. Ive been using strstr for it for years.
I don't like c++ string design. the need for 3-4 objects to do string work is a trainwreck. (string, string stream, string view, is there another one? and sometimes char* for compatibility or workarounds).