fork download
  1. #include <algorithm>
  2. #include <functional>
  3. #include <vector>
  4.  
  5. struct Something
  6. {
  7. };
  8.  
  9. template<class T>
  10. T Function(T x, int s)
  11. {
  12. // blah blah
  13. return x;
  14. }
  15.  
  16. int main()
  17. {
  18. std::vector<Something> data(20);
  19. std::transform(data.begin(), data.end(), data.begin(), std::bind2nd(std::ptr_fun(Function<Something>), 8));
  20. }
  21.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Standard output is empty