K
khalderon
I have a map and want to invoke an object member function over each
element:
typedef map<string, pair<int, int> > table_t;
table_t table;
class delay_analyzer {
void calculate_conn(pair<string, pair<int, int> >&);
void delay_analyzer:rocess()
{
for_each
(
table.begin(), table.end(),
bind1st
(
mem_fun_ref(&delay_analyzer::calculate_conn, this)
)
);
}
};
But my compiler says:
msr.cpp: In member function ‘void delay_analyzer:rocess()’:
msr.cpp:108: error: no matching function for call to ‘mem_fun_ref(void
(delay_analyzer::*)(std:air<std::basic_string<char,
Any ideas what to do?
element:
typedef map<string, pair<int, int> > table_t;
table_t table;
class delay_analyzer {
void calculate_conn(pair<string, pair<int, int> >&);
void delay_analyzer:rocess()
{
for_each
(
table.begin(), table.end(),
bind1st
(
mem_fun_ref(&delay_analyzer::calculate_conn, this)
)
);
}
};
But my compiler says:
msr.cpp: In member function ‘void delay_analyzer:rocess()’:
msr.cpp:108: error: no matching function for call to ‘mem_fun_ref(void
(delay_analyzer::*)(std:air<std::basic_string<char,
&), delay_analyzer* const)’
Any ideas what to do?