草庐IT

hit-boosted

全部标签

python - 使用 boost::python vector_indexing_suite 包装 std::vector

我正在开发一个带有Python绑定(bind)(使用boost::python)的C++库,表示存储在文件中的数据。我的大多数半技术用户将使用Python与之交互,因此我需要使其尽可能Pythonic。不过,我也会让C++程序员使用API,所以我不想在C++方面妥协以适应Python绑定(bind)。图书馆的很大一部分将由容器组成。为了让python用户更直观,我希望他们表现得像python列表,即:#anexamplecompoundclassclassFoo:def__init__(self,_val):self.val=_val#addittoalistfoo=Foo(0.0)v

c++ - 在 clang++ 中使用 boost/thread header 时遇到问题 (Windows)

我正在尝试使用clang++在Windows上使用Boost.Thread。在包含boost/thread.hpp时,我收到以下编译错误:使用-DBOOST_USE_WINDOWS_H:InfileincludedfromD:/env/boost/boost_1_58_0\boost/thread.hpp:13:InfileincludedfromD:/env/boost/boost_1_58_0\boost/thread/thread.hpp:12:InfileincludedfromD:/env/boost/boost_1_58_0\boost/thread/thread_only

c++ - 在 clang++ 中使用 boost/thread header 时遇到问题 (Windows)

我正在尝试使用clang++在Windows上使用Boost.Thread。在包含boost/thread.hpp时,我收到以下编译错误:使用-DBOOST_USE_WINDOWS_H:InfileincludedfromD:/env/boost/boost_1_58_0\boost/thread.hpp:13:InfileincludedfromD:/env/boost/boost_1_58_0\boost/thread/thread.hpp:12:InfileincludedfromD:/env/boost/boost_1_58_0\boost/thread/thread_only

c++ - BOOST_NO_EXCEPTIONS 是否保证与 -fno-exceptions 兼容?

我想将Boost.Filesystem与-fno-exceptions一起使用。根据Boost.Filesystemdocumentation它声明它支持BOOST_NO_EXCEPTIONS宏。但是,以下snippet:#defineBOOST_NO_EXCEPTIONS#includeintmain(){}编译:g++-fno-exceptionsboost_test.cpp给出错误:/.../boost/filesystem/operations.hpp:Inconstructor'boost::filesystem::filesystem_error::filesystem_e

c++ - BOOST_NO_EXCEPTIONS 是否保证与 -fno-exceptions 兼容?

我想将Boost.Filesystem与-fno-exceptions一起使用。根据Boost.Filesystemdocumentation它声明它支持BOOST_NO_EXCEPTIONS宏。但是,以下snippet:#defineBOOST_NO_EXCEPTIONS#includeintmain(){}编译:g++-fno-exceptionsboost_test.cpp给出错误:/.../boost/filesystem/operations.hpp:Inconstructor'boost::filesystem::filesystem_error::filesystem_e

c++ - boost中是否有安全的 bool 成语助手?

很难说出这里问的是什么。这个问题是模棱两可的、模糊的、不完整的、过于宽泛的或修辞的,无法以目前的形式得到合理的回答。为了帮助澄清这个问题以便可以重新打开它,visitthehelpcenter.关闭11年前.25%的程序员工作时间花在检查所需代码是否已经存在上。我正在寻找实现安全bool成语的基类。 最佳答案 bool_testable在Boost.Operators看起来很有希望。引用文献提到:bool_testableprovidestheantithesisofoperatorbool,suchthattheexpressio

c++ - boost中是否有安全的 bool 成语助手?

很难说出这里问的是什么。这个问题是模棱两可的、模糊的、不完整的、过于宽泛的或修辞的,无法以目前的形式得到合理的回答。为了帮助澄清这个问题以便可以重新打开它,visitthehelpcenter.关闭11年前.25%的程序员工作时间花在检查所需代码是否已经存在上。我正在寻找实现安全bool成语的基类。 最佳答案 bool_testable在Boost.Operators看起来很有希望。引用文献提到:bool_testableprovidestheantithesisofoperatorbool,suchthattheexpressio

android - 如何将 android 的 boost 构建为支持 c++11 的共享库

我正在尝试为支持c++11的android构建boost_1.60.0(作为共享库)。我正在使用最新的ndk(目前是android-ndk-r10e)。构建主机是Windows-10。这是针对非开源项目的。据我了解,我不能使用gnuSTL_shared,我需要使用c++_shared作为androidc++运行时。我的project-config.jam看起来像这样:androidNDKRoot=c:/android-ndk-r10e;usinggcc:android:$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.8/preb

android - 如何将 android 的 boost 构建为支持 c++11 的共享库

我正在尝试为支持c++11的android构建boost_1.60.0(作为共享库)。我正在使用最新的ndk(目前是android-ndk-r10e)。构建主机是Windows-10。这是针对非开源项目的。据我了解,我不能使用gnuSTL_shared,我需要使用c++_shared作为androidc++运行时。我的project-config.jam看起来像这样:androidNDKRoot=c:/android-ndk-r10e;usinggcc:android:$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.8/preb

c++ - boost::multi_array 调整大小不起作用

我无法调整boost::multi_array的大小。当我尝试它时,它会给出关于std::_Copy_impl等的错误。这是代码#includetypedefboost::multi_arrayarray_type;classarrayclass{public:arrayclass(array_type::extent_genextents):multiarray(extents[3][4]){}array_typemultiarray;};intmain(){array_type::extent_genextents;arrayclassarraytest(extents);arra