BinaryByter
would you call them functors?
olli
would you call them functors?
Yes, but you should no longer use them. And I would decide against implementing them
olli
Sorryyhhhh
Nothing to be sorry about, but they have been "replaced" in C++11
BinaryByter
By function?
olli
By function?
std::mem_fn
BinaryByter
Wheres the difference?
BinaryByter
Anyway schooool :(
olli
Wheres the difference?
arbitrary number of parameters e.g. struct Foo { void operator()(int, float, double, char) const {} }; void bar() { const Foo f; auto x = std::mem_fn(&Foo::operator()); x(f, 1, 3.14f, 4.14, 'a'); } where as std::mem_fun_t like objects are "[Wrappers] around a member function pointer. The class instance whose member function to call is passed as a pointer to the operator(). 1) Wraps a non-const member function with no parameters. 2) Wraps a const member function with no parameters. 3) Wraps a non-const member function with a single parameter. 4) Wraps a const member function with a single parameter." https://en.cppreference.com/w/cpp/utility/functional/mem_fun_t
Marie
R has 1/3 warnings... watch out! Reason for last warn: advertisment
Ludovic 'Archivist'
std::mem_fn
This is also removed in c++17
Ludovic 'Archivist'
Maxi was right
olli
This is also removed in c++17
Are you sure? Afaik it was revised in 14
Ludovic 'Archivist'
Are you sure? Afaik it was revised in 14
https://en.cppreference.com/w/cpp/utility/functional/function
Ludovic 'Archivist'
Are you sure? Afaik it was revised in 14
https://en.cppreference.com/w/cpp/utility/functional/mem_fn
Ludovic 'Archivist'
olli
Removed in c++14
Yes the overloads not the first one
Ludovic 'Archivist'
Yes the overloads not the first one
The first one will in the end wrap the class in std::function and then wrap it back
Anonymous
Is anyone uses graphics.h in c?
olli
The first one will in the end wrap the class in std::function and then wrap it back
No, it is unspecified what will be returned. Libcxx uses a custom type __mem_fn and in no means makes use of std::function
olli
Maxi was right
Did I state otherwise?
Ludovic 'Archivist'
I said the std::function would be further wrapped, not what type will the wrapper be
olli
I did not talk about return type
There is still not std:: function used
olli
And it's still present in c++17
Ludovic 'Archivist'
There is still not std:: function used
I said the parameter will be implicitly converted in a std::function for most cases
olli
Can you show an implementation that does that? Libcxx does not
Ludovic 'Archivist'
Which parameter? Of mem_fn?
It does only take one afaik
olli
Btw http://eel.is/c++draft/func.memfn
olli
It does only take one afaik
Yes it does, just to make sure we are talking about the same thing here. Can you show me an implementation that does as you said?
Ludovic 'Archivist'
Did I not stress it enough on Implicit?
olli
Did I not stress it enough on Implicit?
If you think it's done this way, alright... O still recommend to look at an implementation see std::function not being used
olli
But still mem_fn stays in the standard
Ludovic 'Archivist'
But still mem_fn stays in the standard
Yeah, but it is all but useful
Ludovic 'Archivist'
You could use invoke
olli
You could use invoke
Which is used by libcxx implementation
Ludovic 'Archivist'
Cases when you REALLY need mem_fn for itself are anecdotic
Ludovic 'Archivist'
I may have used this thing once in the last 10 years
olli
I haven't called it great anywhere. Sometimes it is quite convenient though. The only thing I mentioned was to rather implement mem_fn instead of the removed mem_func ones. And the implementation I am aware of (libcxx) does neither explicitly nor implicitly convert to a std::function Convince yourself and look at the implementation
Anonymous
Link of cpp documentation please ?
Marie
Link of cpp documentation please ?
http://www.fuckinggoogleit.com/
olli
Link of cpp documentation please ?
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf http://eel.is/c++draft/ https://en.cppreference.com/w/
Anonymous
I am doing the project to make student report here but I am struggling on putting the symbol and code next to the marks can anyone help me on that please...🙏🏾🙏🏾🙏🏾🙏🏾
Marie
I am doing the project to make student report here but I am struggling on putting the symbol and code next to the marks can anyone help me on that please...🙏🏾🙏🏾🙏🏾🙏🏾
No need for meta questions. Just ask directly! "Any $x developer?" Probably. Just ask your question and somebody will help!
Anonymous
Okay
Marie
Contact me in PM to get the list of possible commands.
Marie
Notes in chat: - cpp - cppbook - freeprogrammingbooks - goodcodingmentality - goodgoogling - googleit - hownottoask - howtoask - ide - learn - meta - noendl - offtopic - ot - projects
BinaryByter
@ollirz
BinaryByter
dafaqq why do I get a runtime error on that line?
BinaryByter
Dima
wtf
BinaryByter
BinaryByter
wtf
exactly
BinaryByter
what the fuck
Dima
editing collection while iterating it hmm
Anonymous
Here anyone knows which compiler is best for Android?
BinaryByter
none fucking get a computer
Anonymous
none fucking get a computer
Have one, but got damaged 😕 few days back
BinaryByter
don't expect to learn coding on your phone
Anonymous
Shit... 😔
Dima
you can but this is terrible
Dima
won’t recommend
Dima
buy cheapass laptop and install linux
Anonymous
you can but this is terrible
I will try my best, I Know it may take too much time but i don't want to skip or stop for certain time
olli
@ollirz
According to the image below because of a possibly duplicated free. What is the type of type_vector?
Anonymous
Write on paper
Tried, but getting problem...
Anonymous
Guys,how is this thing legal?
Anonymous
Guys,how is this thing legal?
Can anyone tell me the name of this software??
olli
std::vector <char> tape_vector
Are you using multiple threads? your function looks fine and the error can probably not be reproduced using the given information
BinaryByter
atleast not that I know of 🤔