stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: fallback support for traits
Date Thu, 17 Jul 2008 17:59:59 GMT
 

Travis Vitek wrote:
>
>
>As I see it, my options are...
>
>	1. put code that will prevent instantiation in the the type
>declaration (i.e. static_assert)
>	2. provide a suitable default that is not correct, but can be
>used to detect the failure
>	3. disable traits entirely by defining _RWSTD_NO_EXT_CXX_0X if
>the macros have not been defined
>	4. disable the affected traits (and their tests) if the macros
>have not been defined
>

Another option would be to write config tests to look for __alignof()
and alignof(). If these are found, then we could use them. If not we
could get the alignment of a few primitive types, and I could provide an
aligned_storage implementation that supports only these alignments. The
test would need to check a bunch of macros, but it would all work out.


Mime
View raw message