#7 out-of-box std::pair support

open
nobody
None
5
2009-04-16
2009-04-16
Anonymous
No

following class containing variable of type std::pair<int, int> (std::pair<T> in general) should be exposed without any warnings (just like other STL containers):

#include <utility>

class I
{
public:
I(int a, int b)
{
pair_.first = a;
pair_.second = b;
}
std::pair<int, int> pair_;

int compute(){return pair_.first + pair_.second;}
};

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks