Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - There seems to be a harsh limit in templates...
This transition table for a BACnet 'receive frame' state machine, using boost's state machine, won't compile: Right about in the middle of it, the compiler says it expects ">"... typedef mpl::list < transition< s_idle, e_eatoctet, s_idle, &rec_frm_sm::do_naught > , transition< s_idle, e_preamble1, s_preamble, &rec_frm_sm::do_naught > , transition< s_preamble, e_preamble1, s_preamble, &rec_frm_sm::do_ignore > , transition< s_preamble, e_notpreamb, s_idle, &rec_frm_sm::do_reset > , transition< s_preamble, e_preamble2, s_header, &rec_frm_sm::do_naught > , transition< s_header, e_frametype, s_header, &rec_frm_sm::do_savfrmt > , transition< s_header, e_dest, s_header, &rec_frm_sm::do_savdest > , transition< s_header, e_source, s_header, &rec_frm_sm::do_savsrc > , transition< s_header, e_length1, s_header, &rec_frm_sm::do_savlen1 > , transition< s_header, e_length2, s_header, &rec_frm_sm::do_savlen2 > , transition< s_header, e_headCRC, s_headCRC, &rec_frm_sm::do_vrfhdr > , transition< s_headCRC, e_badhCRC, s_idle, &rec_frm_sm::do_reset > , transition< s_headCRC, e_frm2long, s_idle, &rec_frm_sm::do_reset > , transition< s_headCRC, e_no_data, s_idle, &rec_frm_sm::do_reset > , transition< s_headCRC, e_notforus, s_idle, &rec_frm_sm::do_naught > , transition< s_headCRC, e_data, s_data, &rec_frm_sm::do_savdat1 > , transition< s_data, e_data, s_data, &rec_frm_sm::do_savdata > , transition< s_data, e_dataCRC1, s_data, &rec_frm_sm::do_naught > , transition< s_data, e_dataCRC2, s_dataCRC, &rec_frm_sm::do_vrfdCRC > , transition< s_dataCRC, e_baddCRC, s_idle, &rec_frm_sm::do_reset > , transition< s_dataCRC, e_goodCRC, s_idle, &rec_frm_sm::do_rcvfrm >::type transition_table; Dec 12 2003
Never mind, it's a boost artificial limit of 10 on list. For whoever else may be concerned, the solution is to, instead of #include "boost/mpl/list/list.hpp" typedef mpl::list < ...only up to 10 items... > to, #include "boost/mpl/list/list30.hpp" typedef mpl::list22 < ...22 items... > --i.e.: listXX where XX is the exact number of items. Cheers! dan Dec 12 2003
|