error C2143: syntax error : missing ',' before '<'

The code below don't compile in vs 2012. In line 4 I got an error C2143: syntax error : missing ',' before '<'. Can somebody help me to fix it. I would be very appreciate.

ps. dont' focus on case insensitive, i have delete something to make the code simpler.

#include<functional>

template<typename Ty>
struct case_insensitive_less : public binary_function<Ty, Ty, bool>{
    bool operator()(Ty const& left, Ty const& right) const
    {
        return (left < right);
    }
};

int main(){}

Answers


You need the std namespace:

std::binary_function

Note that std::binary_function is deprecated in C++11. If you have C++11 support, consider using std::function and/or lambdas.


Need Your Help

android how to load an intent inside a view

android activitygroup

i know that ActivityGroup is able to change the content of a view, but it is about to be decaperate..

Kivy - editing label when button clicked

python button refresh kivy

I wish button1 to edit Label 'etykietka' when clicked, but i don't know how. Have you got some ideas?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.