Timeline for Optimize RecursionArray interface
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 21, 2014 at 23:06 | comment | added | Morwenn |
I don't like to do this, but I edited the code I posted to show how types_t is useful for DRY.
|
|
| Mar 16, 2014 at 17:11 | history | edited | Morwenn | CC BY-SA 3.0 |
Forgot typename keyword.
|
| Mar 12, 2014 at 2:04 | answer | added | Yuushi | timeline score: 6 | |
| Mar 9, 2014 at 12:09 | comment | added | Morwenn |
@amon Haha, I know what you mean. At first, the reason was since RecursiveArray already knows Derived, there is no reason to pass to it any other template parameters than can be found in Derived. I say unsigned int in types_t and if I want to change it, I only have to change it in one place. But note that I failed since I wrote unsigned int int MemoizedFibonacci while I should have written types_t<MemoizedFibonacci>::value_type, which is quite dumb since I created types_t so that I would have to write unsigned int in only one place.
|
|
| Mar 9, 2014 at 9:12 | comment | added | amon |
I am not very experienced with C++, but wouldn't it be better to pass in the value_type as an argument to the template: RecursionArray<MemoizedFibonnacci, unsigned int>? It seems you really like templates, and have overused them a little bit ;-)
|
|
| Mar 3, 2014 at 10:41 | history | edited | Morwenn | CC BY-SA 3.0 |
Removed c++1y remnants.
|
| Jan 12, 2014 at 9:23 | history | tweeted | twitter.com/#!/StackCodeReview/status/422297849544839168 | ||
| Dec 22, 2013 at 22:21 | history | edited | 200_success |
edited tags
|
|
| Dec 22, 2013 at 12:31 | history | edited | 200_success |
edited tags
|
|
| Nov 7, 2013 at 23:38 | history | edited | Jamal |
edited tags
|
|
| Nov 7, 2013 at 23:34 | history | asked | Morwenn | CC BY-SA 3.0 |