c++ - Remove_if predicate for list -


Why will not this work when I use template function bidding?

  class A {Int x; Public: A (Int X): X (x) {} ITXX (Constant {Return X;}}; Template & lt; Typename T & gt; Bool lower_than_two (T const & a) {return (a.getX () <2); } Int main () {List & lt; A & gt; L; For (Int i = 0; I  

You type the template type a . Then you l.remove_if (lower_than_two


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -