Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ templates

Name: Anonymous 2015-04-25 6:26

Meanwhile if you can use templates then you can define a function like this:
template<typename T>
__attribute__((malloc)) static inline T * allocate(size_t count) {
return reinterpret_cast<T*>(malloc(count * sizeof(T)));
}
Now you can't mess it up, the compiler does the work for you.
http://genesisdaw.org/post/progress-so-far.html

Name: Anonymous 2015-04-25 12:20

>>3
He's just copying what was posted on the site he linked, dummy. However, that said, >>1,2-san doesn't know how to multi-line quote.

Ignoring that, and looking at the site, I found this gem:

At this point I felt crazy for even considering Rust. I had accomplished more in 4 days what took me 16 days in Rust. But more importantly, my abstractions were holding up.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List