Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    195
  • comments
    198
  • views
    104785

Laziness is relative

Sign in to follow this  
SiCrane

155 views

Today I didn't feel like heavy brain work, so I just dumped a bunch of helper functions into the code library. These helpers were container based versions of many of the algorithm members. Along with a few extras like remove_erase() and remove_if_erase().

The only halfway interesting design choices involved are the order of template arguments and the fact that many of the algorithms return a reference to the container, which allows for chaining the calls. e.g.: sort(remove_erase(some_vector, 6)). I'm not sure if this kind of code is useful as anything other than a code obfuscator, but I might think of a reasonable use for it later.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!