以下のboost::threadプログラムの問題点をmwに教えてください
#include<iostream>
#include<boost/thread/thread.hpp>
boost::mutex mutex;
class A
{
public:
A() : a(0) {}
void operator()()
{
boost::mutex::scoped_lock lock(mutex);
}
private:
int a;
};
int main()
{
boost::thread thr1(A());
boost::thread thr2(A());
thr1.join();
thr2.join();
}
エラーメッセージが表示されます:エラー:非クラスタイプの「thr1」のメンバー「join」のリクエスト「boost :: thread()(A()())」BoostThread2.cpp:30:エラー:リクエスト非クラスタイプの「thr2」のメンバー「join」の場合「boost::thread()(A()())」