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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -