Skip to main content
9 events
when toggle format what by license comment
Dec 21, 2019 at 14:09 comment added Edward Good answer! Also relevant: stackoverflow.com/questions/46163607/…
Dec 20, 2019 at 15:54 comment added Chris Kushnir I wasn't suggesting modifying the std file, I was suggesting copying it to use as a base for a custom function impl that does what is desired. Overriding new is an option, but you will likely catch a lot of other unwanted alloc's ... unless this is the only place that is potentially doing alloc's.
Dec 20, 2019 at 14:33 comment added shangaoren filehunter I prefer to avoid the modification of std files. But if i understand what you say std::function use only dynamic allocation on few moments for huge objects, instead of modifying the file maybe i should overrride new function to trigger a stop, so i can know when std::function needs allocation ?
Dec 19, 2019 at 1:28 history edited Chris Kushnir CC BY-SA 4.0
added 167 characters in body
Dec 19, 2019 at 1:19 history edited Chris Kushnir CC BY-SA 4.0
added 299 characters in body
Dec 19, 2019 at 0:58 comment added Chris Kushnir There isn't anything platform specific about the VC++ std::function impl, he can copy it and tweak as I mentioned and it will work with any standards compliant compiler.
Dec 18, 2019 at 21:22 comment added ALX23z He needs an implementation for embedded - so MSVC's version is kinda irrelevant. Who knows what kind of implementation of STL or compiler he has. It might work similarly to what you say but if he wants more control over it then it makes sense to implement it.
Dec 18, 2019 at 20:45 review First posts
Dec 18, 2019 at 21:36
Dec 18, 2019 at 20:42 history answered Chris Kushnir CC BY-SA 4.0