ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Mac OS 10 & type_traits/type_with_alignment.hpp
by Douglas Gregor other posts by this author
Jun 6 2003 4:16AM messages near this date
[boost] Mac OS 10 & type_traits/type_with_alignment.hpp | Re: [boost] Mac OS 10 & type_traits/type_with_alignment.hpp
My apologies for the very late reply. I was away for a while and am still
sorting through my inbox...

>  Platform:
>    Mac OS 10.2
>    gcc 3.3 compiled from sources
>    boost cvs from last Friday
> 
>  When porting the Boost.Python bindings for some custom libraries I ran
>  into a problem with static asserts in type_with_alignment.hpp:
[snip patch]
>  This patch allows me to compile and link, and our regression test
>  runs fine.
> 
>  Reducing my code to a minimal test is most likely a time-consuming
>  project that I'd like to avoid if possible (compilation is quite slow
>  to make things worse). Do the authors of the code above have any ideas
>  what could be going wrong? Are there things that I could try first
>  before chopping my code into pieces?

If you could figure out what alignment value you're trying to get a type for
it would help greatly. One way you could do it would be to replace the
static assertion lines with something that will halt the compile and give
back the Align value in an error message, e.g.,

// somewhere
template<bool DontPrintIt, std::size_t Align>  struct maybe_print_align {
typedef void type; }
template<std::size_t Align>  struct maybe_print_align<false, Align> {};

// instead of the static asserts:
typedef typename maybe_print_align<(found > = Align), Align>::type foobar;

Note that when those static asserts fail, it means that you aren't getting
back a type with the right alignment.

    Doug

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Ralf W. Grosse-Kunstleve
Douglas Gregor
Ralf W. Grosse-Kunstleve
Douglas Gregor
Ralf W. Grosse-Kunstleve
David Abrahams
Douglas Paul Gregor
Douglas Paul Gregor
Ralf W. Grosse-Kunstleve

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved