2012-01-27 3 views
1

「私対ブースト、libconfig、プロトコルバッファとglog」のこの新しいエピソードでは、私たちの主人公(私)が絶望的な戦いでブーストと戦っている名前空間の所有権のために!ブーストが突然私の名前空間に入って、機能不足のエラーを主張して

まあ、私はこれはかなりのコード使用してきました:いくつかのために

server.h

#ifndef SERVER_H 
#define SERVER_H 1 

#include "configuration.h" 
#include "client.h" 
#include "client_manager.h" 
#include <string> 
#include <boost/noncopyable.hpp> 
#include <boost/asio.hpp> 
#include <boost/thread.hpp> 
#include <boost/shared_ptr.hpp> 
#include <boost/bind.hpp> 

namespace BBCP { 
    namespace Server { 

class Server : private boost::noncopyable { 
public: 
    Server(BBCP::App::Config const &wrapper) : 
     acceptor(io_service), 
     wrapper(wrapper) 
     //signals(io_service), 
     { } 
    void run(); 
protected: 
    void acceptHandler(boost::system::error_code const &error); 
    void startAccept(); 
    void stopServer(); 
private: 
    boost::asio::io_service io_service; 
    boost::asio::ip::tcp::acceptor acceptor; 
    boost::asio::ip::tcp::endpoint endpoint; 
    //boost::asio::signal_set signals; 

    BBCP::Server::client_ptr newClient; 
    BBCP::Server::ClientManager manager; 

    boost::thread_group client_pool; 
    BBCP::App::Config wrapper; 
}; 

    } 
} 

#endif 

になりまし構築し、それはすべての良い、後まで...よく、何も働いていませんでしたすべてで、それはerroring開始しました:

In file included from /usr/include/boost/type_traits/has_nothrow_constructor.hpp:12:0, 
       from /usr/include/boost/optional/optional.hpp:25, 
       from /usr/include/boost/optional.hpp:15, 
       from /usr/include/boost/thread/pthread/thread_data.hpp:13, 
       from /usr/include/boost/thread/thread.hpp:17, 
       from /usr/include/boost/thread.hpp:13, 
       from ../include/server.h:10, 
       from main.cpp:17: 
/usr/include/boost/type_traits/has_trivial_constructor.hpp:36:1: error: ‘has_trivial_ctor_impl’ is not a member of ‘boost::detail’ 
/usr/include/boost/type_traits/has_trivial_constructor.hpp:36:1: note: suggested alternative: 
/usr/include/boost/type_traits/has_trivial_constructor.hpp:25:8: note: ‘BBCP::Server::boost::detail::has_trivial_ctor_impl’ 

(...) This goes on and on with a lot of dependencies. 

を今、私が見ることができるものから、BBCP::Server::boost::detail::has_trivial_ctor_implboost::detailで定義されたいくつかの方法を指します。ポイントは、boost::detailは私の名前空間に入るべきではない、BBCP::Server

正直に言うと、このエラーはどこから来た私が見ることができないので...

すべてのヘルプは!

ジュリアンが理解されるであろう。

答えて

2

の前に、の前に含まれていたヘッダーのいずれかのバグが、おそらく名前空間を閉じていない可能性があります。

関連する問題