
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/03/2010 02:04 PM, Stewart, Robert wrote:
I'm not sure that's really an improvement. The current design separates throwing and nonthrowing for a reason; take a look at some of the function implementations and you'll see why. Combining those would mean, at the very least, an extra if statement in every function.
What if the policy class provided the behavior you would otherwise control with a conditional? For those policies in which the behavior is not needed, the inline, static member function would do nothing. For those in which the behavior is needed, the member function would do the work unconditionally. Changing the policy changes the behavior, so no need for a conditional.
The above didn't fit with what I thought you guys meant about policy-based stuff. Now that I've corrected that misperception, it looks like it might be a viable answer to at least some of the options. But I'm not sure how to apply it to the throw/nothrow option... I'll experiment with it further and ask if needed. - -- Chad Nelson Oak Circle Software, Inc. * * * -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwIH6sACgkQp9x9jeZ9/wRcdwCgxCYWWsNzfQdEa0J1zPdI0Rho pWcAoJibFFyGwPcAUlk3YuLZg4Iu7xvr =jLe1 -----END PGP SIGNATURE-----