Visit Jeremy's Blog.
Go Back > Blogs
User Name



An Experiment: From C Definitions To Templates

Posted 05-02-2015 at 10:22 PM by rainbowsally
Updated 05-04-2015 at 12:13 AM by rainbowsally (additions and corrections, description mod)

An Experiment: From C Definitions To Templates

This is a tangent, but a forgivable one, no?

Today's mind-blowing Mad Computer Science features:
  • An experiment morphing a regular old C style set of functions into a set of C++ templates.
  • We rename a literal parameter type to a template parameter T and voila!
  • This will help demystify the horrible noise in the messy STL templates by making a simple transition from main_1 to main_2, in which error messages from the compiler
Posted in Uncategorized
Views 253 Comments 0 rainbowsally is offline

STL Template Experiment (Lists)

Posted 12-24-2012 at 11:24 AM by rainbowsally
Updated 08-06-2014 at 10:00 AM by rainbowsally (added link, grammar error, makefile line correction)

We've resurrected some dead code that was pretty ugly but the only worse MESS (officially sanctioned, no less) than STL that we've ever seen is the spaghetti in lex/flex output. -- The Computer Mad Science Dept.


Now what?


...what would ANY good Computer Mad Scientist do in a situation like this?

Today's features are
  • Creating lists using the std::list STL template.
  • Identifying the critical 'operators'
Posted in Uncategorized
Views 1115 Comments 1 rainbowsally is offline

An STL Template Experiment

Posted 12-18-2012 at 06:05 PM by rainbowsally

Today's features:
  • Getting an address of an iterator from stl.
  • Creating a foreach() macro.
  • A couple of ways to work around unwanted C++ compiler warnings.

STL is a freaking nighmare to trace in a debugger so it's not too easy to tell what goes on in them but one thing became quite clear and that is that iterators are generic pointer types internally, which makes sense since STL needs to deal with so many different types.

Here's a little test to play with to show how...
Posted in Uncategorized
Views 605 Comments 0 rainbowsally is offline


All times are GMT -5. The time now is 07:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration