Applying patch to fix #1301: Compilation error when tried to use boost range iterators with wait_all