嵌套地图是正常做法还是非常糟糕?

G-7*_*-71 2 c++ stl map

嵌套地图几个层次是正常的做法还是非常糟糕的?

        // name property     // name singal         // interval of Ranges      // values

typedef std::map<std::string, std::map<std::string, std::map<RangeSignalValue, std::string > > > sgHashSignals;
Run Code Online (Sandbox Code Playgroud)

sbi*_*sbi 10

我当然这样做了.但是,我将定义分解为易消化的块:

typedef std::map<RangeSignalValue, std::string> RangeIntervalMap; 
typedef std::map<std::string, RangeIntervalMap> NameSignalMap;
typedef std::map<std::string, NameSignalMap>    NamePropertyMap;
Run Code Online (Sandbox Code Playgroud)