Skip to content

Commit

Permalink
include algorithm to fix build fail (#165)
Browse files Browse the repository at this point in the history
Summary:
I encountered problem when I build with "ninja all" command
```bash
/home/leus/prog/vrs/vrs/helpers/JobQueue.h: In member function 'void vrs::JobQueue<T>::cancelQueuedJobs(std::function<bool(const T&)>, std::function<void(const T&)>)':
/home/leus/prog/vrs/vrs/helpers/JobQueue.h:118:22: error: 'remove_if' is not a member of 'std'; did you mean 'remove_cv'?
  118 |     auto iter = std::remove_if(queue_.begin(), queue_.end(), selector);

/home/leus/prog/vrs/vrs/test/DataLayoutTest.cpp:146:42: error: 'count' was not declared in this scope
  146 |   size_t lineCount = static_cast<size_t>(count(json.begin(), json.end(), '\n'));
```

This PR will fix problem above.

Pull Request resolved: #165

Test Plan: CI

Reviewed By: hanghu

Differential Revision: D65047136

Pulled By: georges-berenger

fbshipit-source-id: e508623ee7ccf1b40f27df8c2cda6a703a087473
  • Loading branch information
ojh6404 authored and facebook-github-bot committed Oct 28, 2024
1 parent 4bc3a73 commit 3f56b62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions vrs/helpers/JobQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma once

#include <algorithm>
#include <atomic>
#include <condition_variable>
#include <deque>
Expand Down
1 change: 1 addition & 0 deletions vrs/test/DataLayoutTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

#include <algorithm>
#include <iostream>
#include <limits>
#include <type_traits>
Expand Down

0 comments on commit 3f56b62

Please sign in to comment.