I've used variant in this same format before except with a simpler map so I don't know why It gives me an error when I put a wxSize object instead of String in any of the map values it gives me an error
I want to add a map in all the vectors with a key of "SIZE" and a value of a wxSize variable
Gives me no instance of constructor error:
wxSize PlusImageSize = wxSize(30, 30);
std::unordered_map < wxStaticBitmap*, std::vector< std::unordered_map < std::string, std::variant<std::string, wxSize> >>> EditoryMenuBtnCategoryIndex1{
{RightAddBtn, { {"TYPE","PNG"}, {"ACTIVE","WhitePlus.png"}, {"INACTIVE","GreyPlus.png"} , {"SIZE", PlusImageSize } }},
{RightSearchBtn, { {"TYPE","PNG"}, {"ACTIVE","WhiteSearch.svg"}, {"INACTIVE","GreySearch.svg"} }},
{RightEditBtn , { {"TYPE","PNG"}, {"ACTIVE","WhiteEdit.svg"}, {"INACTIVE","GreyEdit.svg"} }},
{RightFilterBtn, { {"TYPE","PNG"}, {"ACTIVE","WhiteFilter.png"}, {"INACTIVE","GreyFilter.png"} }}
};
Works fine:
std::unordered_map < wxStaticBitmap*, std::vector< std::unordered_map < std::string, std::variant<std::string, wxSize> >>> EditoryMenuBtnCategoryIndex1{
{RightAddBtn, { {"TYPE","PNG"}, {"ACTIVE","WhitePlus.png"}, {"INACTIVE","GreyPlus.png"} , {"SIZE", "dwekjf"} }},
{RightSearchBtn, { {"TYPE","PNG"}, {"ACTIVE","WhiteSearch.svg"}, {"INACTIVE","GreySearch.svg"} }},
{RightEditBtn , { {"TYPE","PNG"}, {"ACTIVE","WhiteEdit.svg"}, {"INACTIVE","GreyEdit.svg"} }},
{RightFilterBtn, { {"TYPE","PNG"}, {"ACTIVE","WhiteFilter.png"}, {"INACTIVE","GreyFilter.png"} }}
};
