
Larry Evans wrote:
On 07/07/10 09:53, Timothy Madden wrote:
Hi
I use the following type in my application:
boost::make_recursive_variant < boost::tuple < std::basic_string<TCHAR>, // id std::basic_string<TCHAR>, // name std::basic_string<TCHAR>, // desc std::basic_string<TCHAR>, // type std::basic_string<TCHAR>, // value std::vectorboost::recursive_variant_ // childList > >::type
However when I instantiate it and I try to populate (resize) the vector (member indexed 5 in the tuple, childList) I get: 'boost::recursive_variant_' : class has no constructors from Visual Studio 2008 SP1.
It looks like the boost::recursive_variant_ type is not substituted with the type of the enclosing variant by the make_recursive_variant meta-function. Am I missing something ? Is this is bug ? [...] Maybe you could just use pointers to the enclosing composite, like in:
#include
#include <vector> struct tuple_tree : std::tr1::tuple < float , int , std::vector
{ };
I can use vector
{ }; typedef boost::tuple < int, // serviceID int, // projectID int, // version std::basic_string<TCHAR>, // htmlData, std::basic_string<TCHAR>, // uioDesignData std::vector < boost::tuple < bool, // isGroup std::basic_string<TCHAR>, // uuid int, // version std::basic_string<TCHAR>, // parentID std::basic_string<TCHAR>, // prevID std::basic_string<TCHAR>, // name, std::basic_string<TCHAR>, // desc std::basic_string<TCHAR>, // filename std::vector < boost::tuple < std::basic_string<TCHAR>, // slotID, int, // revision std::basic_string<TCHAR>, // uioID std::basic_string<TCHAR>, // layout std::basic_string<TCHAR>, // variables std::basic_string<TCHAR> // imgName > > // slotList > >, // planPageList std::vector < boost::tuple < std::basic_string<TCHAR>, // uuid int, // revision std::basic_string<TCHAR>, // name std::basic_string<TCHAR>, // desc std::basic_string<TCHAR>, // status std::basic_string<TCHAR>, // statusName, std::basic_string<TCHAR>, // memo std::basic_string<TCHAR>, // designFileName std::vector < UIOVarEntry /* boost::make_recursive_variant < boost::tuple < std::basic_string<TCHAR>, // id std::basic_string<TCHAR>, // name std::basic_string<TCHAR>, // desc std::basic_string<TCHAR>, // type std::basic_string<TCHAR>, // value std::vectorboost::recursive_variant_ // childList >, int, float >::type */ >, // varList std::vector< std::basic_string<TCHAR> > // wireframeList > > // uioList
ProjectData; Thank you, Timothy Madden