[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build Options



I think perhaps it would be a good idea to have a single header file into
which all custumisation that is dependant on preprocessor symbols can be
done.

For example, the allocators I've been coding can align along 32 bit border,
64 bit borders or disregard alignment all-together. This is controlled by
pre-processor symbols. Right now, these symbols are declared right in the
implementation of the allocater. That's not very practical.

It would be alot better to have all these kinds of pre-processor symbols
defined in one header.

I've used this convention to name mine:

PP(?)_OPT_(caps and underscored name of class which this applies to (without
the PP), if applicable)_(something indicating the effect)

So, 64-bit alignment for the ppMemAlloc class would be called:

PP_OPT_MEM_ALLOC_ALIGN_64BIT

Just an idea.