Eneboo - Documentación para desarrolladores
|
00001 // -*- C++ -*- 00002 00003 #ifndef _ALIGNMENTOF_H_ 00004 #define _ALIGNMENTOF_H_ 00005 00006 template <class T> 00007 class alignmentOf { 00008 private: 00009 struct alignmentFinder { 00010 char a; 00011 T b; 00012 }; 00013 public: 00014 enum { value = sizeof(alignmentFinder) - sizeof(T) }; 00015 }; 00016 00017 #endif // _ALIGNMENTOF_H_ 00018