腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
std
::
bind
作为
std
::
bind
的
参数
、
、
、
、
::multimap<float,
std
::function<void(void)> > {
std
::
bind
(ShooterFunc, FVector2D(1.f, 0.f),
std
::
bind
(&ASwatterLevelBase::ShootAndScootMisdirection, this,
std
::placeholders::_1, FVector2D(0.f, 0.f), 8))
浏览 11
提问于2017-02-08
得票数 0
0
回答
将常量指针
作为
std
::
bind
参数
、
下面的代码#include <iostream> int c;
bind
(&f, 1, 2, &t)();报告此错误 error C2893: Failed to speci
浏览 8
提问于2017-01-04
得票数 1
回答已采纳
4
回答
如何使用
std
::
bind
?
、
、
下面是一个解释如何使用
std
::
bind
的
简单示例:auto f2 =
std
::
bind
(f3, _1, 5, _2); 这个示例对我来说很清楚:
std
::
bind
浏览 3
提问于2013-03-21
得票数 5
回答已采纳
1
回答
std
::函数
作为
std
::function
的
参数
、
std
::function<void(int)> fo =
std
::
bind
(&foo,
std
::placeholders::_1);} void foAndFo(function<
浏览 0
提问于2019-02-22
得票数 1
1
回答
为什么没有性病::保护?
、
为什么在
std
::protect中没有与
std
::
bind
一起使用
的
C++11#include
浏览 0
提问于2013-08-29
得票数 24
回答已采纳
1
回答
除非用
std
::ref包装,否则复制C++11 lambda捕获
、
、
、
当将
参数
传递给
std
::
bind
时,它们总是被复制或移动,除非被
std
::ref和我想用lambda表达式包装。问题是,我希望将lambda表达式
的
生成封装在一个函数中,并将用户传递给lambda
的
参数
转发给lambda。我想这样做
的
原因是,我想异步调用lambda,让用户决定
参数
是通过引用还是通过复制传递。我有一个函数print_address,它以
参数
作为
引用。然后我有一个函数combine_a
浏览 0
提问于2018-01-21
得票数 0
回答已采纳
1
回答
boost::
bind
()创建
参数
的
许多副本
、
、
我正在使用boost::
bind
(Boost 1.64.0和gcc 8.3.0)来创建一个可调用
的
对象,并注意到一个有趣
的
特性--在绑定构造函数中传递一个对象,
作为
参数
复制到一个可包装函数。即使对象是用
std
::move()包装
的
。尽管
std
::
bind
按预期工作。;}CreateCopyCopy输出::
b
浏览 2
提问于2020-04-24
得票数 2
回答已采纳
1
回答
std
::
bind
()不绑定
参数
我正在尝试创建一个方法队列,这些方法使用
std
::
bind
()绑定到对象。当调用
std
::
bind
()时,方法
的
参数
(另一个类
的
对象)被绑定。因为某种原因,我无法让它开始工作。endif#include <iostream>#include "file_descriptor.h" using namespace
std
include &
浏览 0
提问于2021-08-07
得票数 2
回答已采纳
2
回答
如何将带有局部变量
的
参数
的
函数包装器嵌入到MSVC2015容器中?
、
、
、
::
bind
(add,
std
::placeholders::_1, int()));
std
::vector<bound_add_t> vec;这是个已知
的
问题吗?我
浏览 6
提问于2016-03-29
得票数 4
回答已采纳
3
回答
如何将boost绑定与成员函数一起使用
、
、
、
我正在尝试使用boost绑定来创建一个函数来调用myclass
的
方法:#include <boost/function.hpp>#include <functional> public: void fun1() { printf("fun1()\n");) { printf("fun2(%d)\n&quo
浏览 1
提问于2010-02-21
得票数 81
回答已采纳
1
回答
std
::
bind
:错误:函数调用
的
参数
太少,没有指定单个
参数
、
我有以下代码: // do things here ...我尝试为上面的函数创建一个
std
::
bind
std
::
bind
(create_msg(), timestamp);}error: too few arguments to functioncall, single argument 'timestamp
浏览 0
提问于2018-12-20
得票数 1
回答已采纳
1
回答
如何使用boost:使用函数指针映射正确绑定
、
、
、
、
我正试图实现这样
的
目标,但得到boost绑定相关
的
错误。::map<
std
::string, boost::function<int(myStruct_t*,
std
::string)> > Map_t; { myVal.push_back("
浏览 2
提问于2016-05-11
得票数 1
回答已采纳
1
回答
使用
std
::apply on
std
::
bind
、
、
]编译#include <tuple>
std
::cout << a << ", " << b << ", " << c <<
std
::endl; auto b =
std
::
bind</em
浏览 1
提问于2018-10-10
得票数 2
回答已采纳
2
回答
只绑定一个
参数
,以后再绑定其他
参数
、
、
、
,所以我想写一个调用函数指针
的
函数。void do_function_with_pic( pfc::RGB_,所以我
的
多核函数有一个更多
的
参数
: pfc::bitmap * bmp,_t * color_table,
浏览 0
提问于2013-02-15
得票数 0
回答已采纳
1
回答
将
参数
传递给
std
::于运行时绑定到调度队列
、
、
我很难将一个
参数
传递给使用函数指针
作为
参数
的
调度队列。(void);
std
::condition_variable _cv;};编辑:我面临
的
问题是在编译时: 不可行从'
浏览 1
提问于2020-08-23
得票数 1
回答已采纳
1
回答
如何存储
参数
填充函数以供以后调用
为此,我尝试使用
参数
包存储函数调用,以允许可变
的
args数:#include <iostream> templateauto
bind
=
std
::
bind
(&SlotProxy::PostEvent, &sp, &Test,
std
::placeholders::_1); 在这里,
st
浏览 3
提问于2022-11-22
得票数 0
回答已采纳
1
回答
使用
std
::
bind
、
、
、
我必须创建一个名为"GetNextProduct“
的
函数,该函数返回<int, Product*>多映射中
的
”下一个“产品(其中”int“键是产品参考号,这是product对象
的
属性)。我们需要在这个函数中使用
std
::
bind
(在“find_if”中)。下面是我所做
的
:{ Product
浏览 2
提问于2018-04-08
得票数 0
1
回答
std
:绑定和完美的转发
、
、
、
<functional> void invoke(Args&&... args)} void
bind
_and_forward(Args&&... args) auto binder =
std
::
bind
(&invoke<Args...>,
std
::forward<Args>(args)...);
浏览 1
提问于2015-06-21
得票数 6
回答已采纳
2
回答
线程和接口C++
、
、
、
我有一些问题要使用接口和工厂创建不同
的
线程:
std
::thread *t2 = new
std
::thread ((*pO
浏览 3
提问于2015-06-25
得票数 0
回答已采纳
1
回答
用boost在文件中查找regex
、
、
、
我想做这样
的
事情:ifstream iss;istream_iterator<string> eos;istream_iterator<string> iit (iss); 这些错误如下: 无法找到“
bind
2nd<_Fn2,_Ty>(bool (*) (BidiIter
浏览 3
提问于2012-10-07
得票数 2
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券