fork(1) download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <functional>
  4. #include <iterator>
  5. #include <vector>
  6. #include <string>
  7.  
  8. bool check_sz(const std::string &s, std::string::size_type sz)
  9. {
  10. return s.size() == sz;
  11. }
  12.  
  13. int main()
  14. {
  15. int sz = 4;
  16. std::vector<std::string> v = { "x", "zzz", "yy", "tttt" };
  17.  
  18. auto check = std::bind(check_sz, _1, 3);
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:18:35: error: '_1' was not declared in this scope
  auto check = std::bind(check_sz, _1, 3);
                                   ^
prog.cpp:18:35: note: suggested alternative:
In file included from prog.cpp:3:0:
/usr/include/c++/5/functional:782:34: note:   'std::placeholders::_1'
     extern const _Placeholder<1> _1;
                                  ^
stdout
Standard output is empty