https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101978
--- Comment #1 from pavlick <ispavlick at gmail dot com> --- Apparently this is due to condition_variable, if it is commented //while (! cv.wait_for(lck, 1s, [&sh_ptr](){ // return sh_ptr->processed == true;}) && true); then there are no warnings