Quote:Original post by swiftcoder
Every programmer who uses std::map should know how to implement a balanced red-black tree too - but you don't see anyone recommending they learn that first, do you?Quote:COME ON! I've used std::map and I don't know what a red-black tree is.
That is exactly my point -
yacwroy is suggesting that everyone should know how to implement std::tr1::function before they use it
No I am not.
If you read, I say they should know how to use function pointers. This does in no way imply they should know how to implement a function pointer wrapper class.
Using function pointers is only 1: putting a function's address into a variable, and 2: calling said function from a variable.
Quote:Original post by swiftcoder
The bigger issue I was hinting at, which you seem to have missed, is that nobody in this thread actually suggested Boost - let alone that you should rewrite your code to use boost::phoenix.Quote:Really... nobody suggested boost in this thread? Have you read the thread?
Have you learned your standard library? In particular, go look in that <tr1/functional> header file I suggested. You will find std::tr1::function - otherwise known as boost::function. So no, nobody has suggested you use boost. Rather we have suggested that you use an element of the C++ standard library.
1. When a person says use boost::, they have suggested boost::. Even if it's in std::tr1, they said boost. And nobody here mentioned std::tr1 till you did.
2. std::tr1:: is not std::. It's not part of the standard library yet. It's just a set of candidates that may be added to std:: at some point in the future.
3. Unlikely as it seems, for all you know the std::tr1::function may undergo a syntactic change. Raw function pointers will not. boost:: may even be more concrete than std::tr1::.
Quote:Original post by wikipediaTR1 is not a standard itself, but rather a draft document. However, most of its proposals are likely to become part of the next official standard.
Quote:If someone had suggested something like boost::phoenix, I probably would have agreed with yacwroy, but for something as basic as boost::function, which has already been added (me: has not) to the C++ standard library, the anti-boost sentiment is ridiculous.
I think it's pretty unfair to call my comments anti-boost. If I say hammers are useful but you shouldn't go out and buy a hammer just to mash your potatoes or push in your doorstop, It's not anti-hammer sentiment.