id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 1946,[type_traits] type_with_alignment fails on non-power-of-2 alignment,andysem@…,John Maddock,"The type_with_alignment template fails to compile if the alignment is not a power of 2. This is a possible situation at least with MSVC 9.0. The following class of a user-defined stream gets alignment of 12: class my_stream : public std::ostream { public: typedef boost::function0< void > function_type; function_type m_function; }; I've attached a reduced code sample with more comments and the compiler error message. I suggest to add a fallback type_with_alignment type in case if the alignment is not a power of 2. This type should have the requested alignment. It may be achieved with the __declspec(align(n)) specifier. ",Bugs,closed,Boost 1.36.0,type_traits,Boost 1.35.0,Problem,fixed,type_traits alignment,