Ubuntu で Intel のコンパイラ icpc を使用して Boost を動作させようとしています。私の管理者は、この Web ページからパッケージをインストールしました。次のようにコンパイルして、Boost の Web ページから基本的な例を実行しようとしています。
icpc -I /usr/include/boost example.cpp -L/usr/lib/ -lboost_regex,
そして、次の形式のコンパイラ エラーが大量に発生します。
/usr/include/boost/smart_ptr/detail/shared_count.hpp(233): error: copy constructor for class "boost::detail::shared_count" may not have a parameter of type "boost::detail::shared_count"
shared_count(shared_count && r): pi_(r.pi_) // nothrow
/usr/include/boost/smart_ptr/detail/shared_count.hpp(233): error: expected a ")"
shared_count(shared_count && r): pi_(r.pi_) // nothrow
/usr/include/boost/smart_ptr/detail/shared_count.hpp(233): error: identifier "r" is undefined
shared_count(shared_count && r): pi_(r.pi_) // nothrow
/usr/include/boost/smart_ptr/detail/shared_count.hpp(340): error: copy constructor for class "boost::detail::weak_count" may not have a parameter of type "boost::detail::weak_count"
weak_count(weak_count && r): pi_(r.pi_) // nothrow
など。驚くべきことに (またはそうではない)、このことは g++ で問題なく動作し、単純に次のように記述します。
g++ example.cpp -o example.out -lboost_regex
これで私を助けていただければ、本当に感謝しています。乾杯!