腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
使用
算术
将
boost
占位
符
转
换为
std
、
、
、
我正在转换一个C++项目,它
使用
boost
和
占位
符
来转换地图,现有的逻辑是: inline const
std
::vector<uint32_t> average(const
std
::pair<uint16namespace bl =
boost
::lambda; // Walk both, do funny thing with each element in turn.), (bl::_1 + bl::_2)
浏览 11
提问于2020-09-08
得票数 0
回答已采纳
1
回答
在客户端代码的不同部分
使用
boost
::bind和
std
::tr1::bind
、
、
、
我
使用
了两个
使用
绑定功能的自定义库。其中一个
使用
std
::tr1中提供的绑定功能,而另一个
使用
boost
绑定<file_name.cpp:line_no:char_no>: error: reference to '_1' is ambiguous &
浏览 8
提问于2015-05-27
得票数 0
1
回答
使用
Boost
融合显示扁平的凤凰表达式
、
、
、
、
按照Proto用户指南中的部分,我
将
遍历一个扁平的proto表达式:_1 + 2 + 3 + 4#include <
boost
/phoenix.hpp> , proto::functional::value() , display() return 0;_1
占位
符
的定义如下所示,
使用
proto::terminal。我
浏览 5
提问于2013-03-03
得票数 1
回答已采纳
1
回答
Boost
.flyweight和
Boost
.MPL
、
、
、
我有一个关于飞量级选项的问题,根据下面的定义,基于
std
::string,
boost
::flyweights::static_holder_class<
boost
::mpl::_1>,
boost
::flyweights::hashed_factory_class<
浏览 0
提问于2011-10-20
得票数 5
回答已采纳
1
回答
在C++ 0x中提升lambda::_1
、
、
、
、
int main()
std
::vector<int> v; v.push_back(3); } 这段代码可以在不
使用
Boost
的情况下转
换为
我知道C++ 0
浏览 3
提问于2011-08-28
得票数 5
回答已采纳
2
回答
绑定到成员变量
、
、
当我们绑定到成员变量时,我搞不懂
boost
::bind做了什么。通过绑定到成员函数,我们实质上创建了一个函数对象,然后调用它,
将
通过
占位
符
提供或延迟并替换的参数传递给它。但是这个表达式在幕后做了什么:替换
占位
符
_1的是什么?我是在阅读
boost
::bind:上的一篇文章中的示例时发现的: void print_string(const
std
浏览 6
提问于2009-07-21
得票数 7
回答已采纳
1
回答
std
::'s和
boost
::s ::bind和::function混在一起会导致问题吗?
、
、
、
如果我在函数中有一个
std
::function作为参数,那么传入
boost
::bind会有什么问题吗?反之亦然?编辑: 我发现当您包含
boost
\bind.h时,
boost
::bind
使用
的
占位
符
直接导入到名称空间中,并且它们与
std
::bind不兼容。对于
std
::bind,您必须显式地引用
占位
符
,例如:
std
::placeholders::_1,或者执行一些其他类型定义,或者
浏览 2
提问于2012-09-02
得票数 5
回答已采纳
2
回答
使用
boost
::async_connect问题
、
、
::system::error_code ec; auto f =
std
::bind(&Irc::connect_handler, this,
boost
::asio::placeholders::_Bind<true,void,
std
::_Pmf_wrap<void (__thiscall Irc::* )(const
boost
::system::error_code &,
boost
::asio::_Bind<true,void,
std
::_
浏览 1
提问于2014-06-16
得票数 1
回答已采纳
1
回答
使用
参数,这个
boost
::signals2实现有什么问题呢?
、
、
、
我正在
使用
boost
::signals2 2::signal实现Dispatcher类。到目前为止,我已经成功地
使用
了没有参数的信号,但是我正在尝试用参数来实现它们。调度员看起来如下:public:::bind(&atlas::Controller::onSignal2, & controll
浏览 10
提问于2014-06-21
得票数 0
1
回答
使用
std
::绑定
占位
符
和
boost
库时的问题
、
我
使用
boost
库测试框架创建了一个单元测试,并在
使用
该库时遇到了
使用
std
::bind
占位
符
时遇到的问题。如果我显式地
使用
std
::placeholders:: + _1,它可以很好地工作:
std
::bind(&TestFixture::concatStrings, this,
std
::placeholders::_1,
std
::placeholders::_2)
浏览 3
提问于2017-11-18
得票数 2
1
回答
我如何转换助推::精神::气::词的属性
std
::string?
、
、
、
、
('.') | char_('_'))][ ]; '
boost
::fusion::vector2<char,
std
::__1::vector<char,
std
::__1::allocator<char> > >'
浏览 3
提问于2015-06-11
得票数 7
回答已采纳
1
回答
在c++中没有符号的整数提升
、
unsigned i = 5; double d = i + j; int k = i + j;
std
::cout << l << "\n"; //4294967291
std
::cout <<k
浏览 2
提问于2017-02-13
得票数 4
回答已采纳
3
回答
如何
将
boost
绑定与成员函数一起
使用
、
、
、
我正在尝试
使用
boost
绑定来创建一个函数来调用myclass的方法:#include <
boost
/function.hpp> void fun2(int i) { printf("fun2(%d)\n", i); }
boost
::fun
浏览 1
提问于2010-02-21
得票数 81
回答已采纳
2
回答
我如何才能
std
::sqrt(
boost
::lambda::placeholder1_type)?
、
、
、
如何在
std
::sqrt()上
使用
boost
::lambda::placeholder1_type
std
::cout <<
boost
::la
浏览 2
提问于2017-07-05
得票数 3
回答已采纳
1
回答
修改filter_iterator谓词以接受
BOOST
中的两个参数(二进制fn)
、
、
、
、
关于我之前的问题,如何
将
另一个参数传递给谓词。例如,下面是代码片段。在上面的代码中,它只需要一个参数(如edge_descriptor我希望传递一个逻辑变量,例如,
将
int传递给谓词,并将边缘的edge属性与int进行比
浏览 1
提问于2014-01-19
得票数 0
回答已采纳
1
回答
从
boost
::bind移动到
std
::bind:编译错误
、
、
、
、
else in Bar.cpp //Do stuff当我在上面的代码中愉快地
将
boost
改为
std
,false>,BarLib::Bar *,
boost
::arg<1>>,1> _Carg0=
std
:::* cons
浏览 0
提问于2012-04-18
得票数 6
回答已采纳
3
回答
为什么这个"
boost
::bind“不能编译?
、
、
、
我正在尝试
使用
boost
::bind和
boost
::function,但是出现了编译错误。为什么不能将
占位
符
绑定到函数对象?void fun_1(const
boost
::system::error_code& error)
std
::cout<<"test_1------------"<<
std
::endl;}{
std
::
浏览 5
提问于2012-11-19
得票数 2
回答已采纳
2
回答
函数deadline_timer::async_wait()的参数
、
我正在学习
Boost
.Asio,但我有一个关于
boost
::asio::deadline_timer async_wai的问题。<iostream>#include <
boost
/bind.hpp>{
浏览 7
提问于2013-11-29
得票数 2
回答已采纳
1
回答
占位
符
在
Boost
中的角色::bind在下面的示例中
、
关于
占位
符
的
使用
有很多例子,但是我还是有点困惑,如果有人能解释一下以下两种说法的区别,我会很感激的。void SomeMethod(int a)
std
::cout << "Parameter pass " << a << "\n"; Statement 2 :
boost
::bind(&am
浏览 6
提问于2013-09-08
得票数 1
回答已采纳
1
回答
如果我知道gdb的类型,我如何看到
boost
::any的值
、
、
、
、
我有一个核心
转
储,我正在用gdb查看核心
转
储。warning:
浏览 4
提问于2012-12-15
得票数 7
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
一起学习Boost标准库-Boost.texical
C+模板元编程:探索无穷可能性的神技!
好程序员Python教程系列分享之Python语言元素之运算符
初次接触go-1
boost:asio中的buffer与streambuf简介
热门
标签
更多标签
云服务器
ICP备案
对象存储
腾讯会议
云直播
活动推荐
运营活动
广告
关闭
领券