I'd like type_with_alignment<> to handle sizes between 'true' alignments, and/or have a way to map 'in bwetween' alignments to their lower alignment.

ie I have a struct of unknown type, but known size = 5.  What is it's alignment?  You could 'punt' and say max_align, but I suggest that its alignment is <= 5 (ie probably 4 for a typical platform).  ie imagine that the struct might have an int as it's first member, but can't have a double (assuming sizeof(double) > 5), so the alignment might need to be alignment_of<int>, but can't be alignment_of<double>.  Does this assumption hold true?

So how can I map (at compile time) an integer 'n' to the closest 'x' <= n  where x is from the set S, and where S is the set of possible alignments?

Tony