fork download
  1. #include <vector>
  2.  
  3. template <typename T>
  4. void sort(T &container) {}
  5.  
  6. template <typename F, typename T>
  7. void sort_container(F sort_func, T &container) {
  8. sort_func(container);
  9. }
  10.  
  11. int main() {
  12. std::vector<int> x = {1,2,3};
  13. sort_container(sort<decltype(x)>, x);
  14. }
Success #stdin #stdout 0s 2980KB
stdin
Standard input is empty
stdout

Standard output is empty