Merge from trunk GCC workaround (fixes #8651)

git-svn-id: http://svn.boost.org/svn/boost/branches/release@84747 b8fc166d-592f-0410-95f2-cb63ce0dd405
Thread: merge fixes for #8422, #8458, #8674.

git-svn-id: http://svn.boost.org/svn/boost/branches/release@84750 b8fc166d-592f-0410-95f2-cb63ce0dd405