Skip to content

Commit

Permalink
Replace auto in sig with template type
Browse files Browse the repository at this point in the history
  • Loading branch information
mmore500 committed Apr 18, 2024
1 parent c8d4b81 commit 66b1fa3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/emp/io/File.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,16 @@ namespace emp {
}

// Get a block of lines, ending when a condition is met.
emp::vector<String> ReadUntil(auto test_fun) {
template <typename T>
emp::vector<String> ReadUntil(T test_fun) {
auto out = file.ReadUntil(line, test_fun);
line += out.size();
return out;
}

// Get a block of lines for as lone as a condition is met.
emp::vector<String> ReadWhile(auto test_fun) {
template <typename T>
emp::vector<String> ReadWhile(T test_fun) {
auto out = file.ReadWhile(line, test_fun);
line += out.size();
return out;
Expand Down

0 comments on commit 66b1fa3

Please sign in to comment.