Error C2064: Pointeur de fonction
Bonjour,
j'ai une erreur bizarre:
Code:
1 2
|
Error 1 error C2064: term does not evaluate to a function taking 0 arguments c:\program files\boost\boost_1_35_0\boost\thread\win32\thread.hpp 185 |
venant du code suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| // @brief Load the repositories
void CFXTopsApp::LoadRepositories() {
try {
// Calendar Initialisation
calRepository->LoadCalendars();
}
catch(otl_exception& p){ // intercept OTL exceptions
std::cout << p.msg << endl; // print out error message
std::cout << p.stm_text << endl; // print out SQL that caused the error
std::cout << p.var_info << endl; // print out the variable that caused the error
AfxMessageBox(_T("Oracle Error: ") + CString(p.msg) ,MB_ICONSTOP);
}
catch (com::fxoverlay::support::exception::FxtopsException &e) {
AfxMessageBox(CString(e.what().c_str()) ,MB_ICONSTOP);
}
}
/**
* initialisation de CFXTopsApp
* Initialisation de l'application
*/
BOOL CFXTopsApp::InitInstance()
{
if(false==LoadIniFile())
return FALSE;
// Load the calendars
try {
otl_connect::otl_initialize();
logon = std::string(CT2A(m_Schema)) + "/" + std::string(CT2A(m_Password)) + "@" + std::string(CT2A(m_otlconnect));
db.rlogon(logon.c_str());
calRepository = new com::fxoverlay::dao::oracle::time::OracleCalendarRepository(&db);
boost::thread thrd(&CFXTopsApp::LoadRepositories);
.... |
thread.hpp
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| class BOOST_THREAD_DECL thread
{
private:
thread(thread&);
thread& operator=(thread&);
void release_handle();
template<typename F>
struct thread_data:
detail::thread_data_base
{
F f;
thread_data(F f_):
f(f_)
{}
thread_data(detail::thread_move_t<F> f_):
f(f_)
{}
void run()
{
f();
}
}; |
La ligne rouge est la ligne de lerreur.
J'ai poste ici plutot que directement dans boost car je pense que c'est plus un pb de C++ que d'utilisation de boost.
Si vous avez une idée.
PS: VS 2005, XP, Boost 1.35