![](/img/trans.png)
[英]Using C++11 with move semantics - without the standard library (and with Boost.smart_ptr)
我正在從事嵌入式項目,使用Zephyr RTOS和 ARM 嵌入式微控制器,如 STM32 Nucleo 系列 (Cortex M4/0)。 最近,由於最近版本的 Zephyr 對 C++ 支持的顯着改進,我正在考慮從 C 開發轉向現代 C++。 默認情況下,Zephyr 包含 C 標准庫,但不 ...
[英]Using C++11 with move semantics - without the standard library (and with Boost.smart_ptr)
我正在從事嵌入式項目,使用Zephyr RTOS和 ARM 嵌入式微控制器,如 STM32 Nucleo 系列 (Cortex M4/0)。 最近,由於最近版本的 Zephyr 對 C++ 支持的顯着改進,我正在考慮從 C 開發轉向現代 C++。 默認情況下,Zephyr 包含 C 標准庫,但不 ...
[英]Why does assigning the return value of boost::move() to a non-const reference fails in C++0x mode but works in C++03 mode
這是可用於重現此問題的源代碼: 在GCC中使用C ++ 03模式時,代碼可以毫無問題地編譯。 另一方面,使用C ++ 0x模式會產生以下錯誤: 這種失敗的原因是什么? 有沒有辦法在C ++ 11模式下解決該問題? 上面提供的代碼是我在通用代碼中使用的簡化版。 因此,需 ...
[英]Compiling boost::move in gcc 4.6.4
我有一個使用Boost :: move移動鎖的功能- 我可以使用帶有-std = c ++ 11或-std = c ++ 0x標志的gcc 4.7.3來編譯此代碼。 但是,對於gcc 4.6.4,即使使用-std = c ++ 0x標志,該代碼也會失敗。 有想法該怎么解決這個嗎? ...
[英]Porting C++11 std::thread to boost::thread compile issues
我正在嘗試使用boost :: thread將C ++ 11 std :: thread代碼移植到VC9(VS 2008)。 下面的“等效” C ++ 11代碼在msvc12上可以正常編譯: 我想使用msvc9編譯器和Boost 1.55將代碼移植到C ++ 03。 如何解決以下編譯 ...
[英]Moving an std::string into a boost::thread in C++03
我在沒有C ++ 11的多個平台和編譯器上使用boost 1.51。 在我的主線程中,我有一個很長且昂貴的副本std::string veryLongString ,我需要將其傳遞給新線程進行處理。 創建新線程后,我不再在主線程上使用veryLongString ,因此我想將其移入bo ...