boost

    1熱度

    1回答

    我正在使用Boost 1.64並使用CMake在VS 2013中生成一個項目。其代碼如下: #include <boost\process.hpp> namespace bp = boost::process; int main() { int result = bp::system("g++ main.cpp"); } 當我嘗試調用它,我得到這個錯誤: Error 1 er

    1熱度

    1回答

    我試圖改變一個即發即熱的UDP發送函數從同步到異步的實現。 目前簡易的同步功能看起來是這樣的: ssize_t UDPTransport::send_to(const char * buffer, size_t bufferSize) { return mPSocket->send_to(boost::asio::buffer(buffer, bufferSize), mOutputEn

    0熱度

    1回答

    在我的CentOS 6.9環境下,boost-devel指的是Boost 1.4 .0庫。 的問題是,升壓:語言環境不適用於相對於一個特定的時區我的日期的計算,如升壓:語言環境似乎來加速1.4 0.0。 是否有替代做類似1.41(或替代Boost)的事情? // adding a day to now with timezone in mind std::locale::global(...a

    3熱度

    1回答

    我從boost :: beast網站複製websocket示例並運行它Websocket會話工作正常,但我不知道如何將接收到的multi_buffer轉換爲字符串。 下面的代碼是websocket會話處理程序。 void do_session(tcp::socket &socket) { try { // Construct the stream by moving in

    0熱度

    1回答

    我安裝了像這個Installing Boost under Ubuntu問題中提出的boost。然而,當我嘗試執行它試圖包括升壓像cmake的文件: find_package(Boost CONFIG REQUIRED COMPONENTS system) 它告訴我,它無法找到既不以下兩個文件: BoostConfig.cmake 助推config.cmake 提示您應該將「Boost」的安裝

    1熱度

    1回答

    以下是已使用boost::program_options的代碼。 #include <iostream> #include <vector> #include <boost/program_options.hpp> int main (int argc, char* argv[]) { int n; std::string mps_name; boost:

    1熱度

    1回答

    我有2個應用程序。一個寫高頻數據來提升託管共享內存,數據結構是boost deque。 typedef boost::interprocess::allocator<REALTIME_INFO, boost::interprocess::managed_shared_memory::segment_manager> ShmemAllocator; typedef boost::interproc

    1熱度

    1回答

    在升壓DOC: Binding member functions can be done similarly. A bound member function takes in a pointer or reference to an object as the first argument. For instance, given: struct xyz { v

    1熱度

    1回答

    我正在用C++開發一個對延遲敏感的應用程序。有一個模塊在使用boost :: unordered_map。 在插入地圖的第一個條目時,我經歷了太多延遲,之後所有條目都有適當的插入時間。 如果我使用std :: unordered_map而不是boost :: unordered_map,則不會發生此行爲。在這種情況下,第一次插入也需要幾百納秒(100〜200)。 這裏有一些時間統計,我注意到: -

    0熱度

    2回答

    我是Boost Log的新手,並且遇到了一些非常簡單的問題。 我正在嘗試創建一個記錄器併爲其分配一個級別(例如警告,信息,跟蹤等),並過濾掉(出於性能原因)發送到該記錄器的任何日誌,並將其分配給記錄器處於日誌記錄核心級別,而不是接收器級別。 例如(僞代碼): logger lg; lg.setLevel(Warn); BOOST_LOG_TRIVIAL(trace) << "A trace s