
Index: ChangeLog from Damien Thivolle <damien@lrde.epita.fr> * oln/io/utils.hh: Add a traits for g++-3.3. utils.hh | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) Index: oln/io/utils.hh --- oln/io/utils.hh (revision 72) +++ oln/io/utils.hh (working copy) @@ -150,29 +150,31 @@ } template <bool b> - struct pnm_io_helper + struct pnm_io_helper_bool { - enum { size = 1}; typedef unsigned char type; }; template <> - struct pnm_io_helper<false> + struct pnm_io_helper_bool<false> { - enum { size = 2}; typedef unsigned short type; }; + template <unsigned N> + struct pnm_io_helper + { + typedef typename pnm_io_helper_bool<N <= 8>::type type; + }; - } // end of namespace internal } // end of namespace io } // end of namespace oln -# define oln_io_type(N) typename oln::io::internal::pnm_io_helper<N <= 8>::type -# define oln_io_type_(N) oln::io::internal::pnm_io_helper<N <= 8>::type +# define oln_io_type(N) typename oln::io::internal::pnm_io_helper<N>::type +# define oln_io_type_(N) oln::io::internal::pnm_io_helper<N>::type #endif // ! OLENA_IO_UTILS_HH