Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actuallightxbulb

Posted 31 May 2013 - 01:30 PM

The sort function takes a function, and thus your template has to be instantiated at the point it is passed to the sort function.

Ah!ohmy.png Thanks a lot - that's what I was missing! sort is expecting a function and I provide a template... even though it will call the function multiple times later and would be able to figure out what to do with a template it still expects a function as an argument. Thanks a lot about this, I figured it out thanks to this comment. Though I wouldn't say it will be illogical if they added an overload of sort() where it can take a function template, or would it?


#1lightxbulb

Posted 31 May 2013 - 01:29 PM

The sort function takes a function, and thus your template has to be instantiated at the point it is passed to the sort function.

Ah!ohmy.png Thanks a lot - that's what I was missing! sort is expecting a function and I provide a template... even though it will call the function multiple times later and would be able to figure out what to do with a template it still expects a function as an argument. Thanks a lot about this, I figured it out thanks to this comment. Though I wouldn't say it will be illogical if they added an overload of sort() where it can take a function template, or will it?


PARTNERS