#include #include using boost::container::small_vector; struct mystruct { mystruct& operator=(const mystruct& other) { i = other.i; sv = other.sv; return *this; } int i; small_vector sv; }; typedef std::map mymap; typedef std::map > mymap2; typedef std::map, 8> > mymap3; int main() { mymap m; mystruct& sv = m[0]; mymap2 m2; small_vector& sv2 = m2[0]; mymap3 m3; small_vector, 8>& sv3 = m3[0]; }