Do std::list/vector, boost::unorder_map, etc. have good copy constructors? or do I need to return by reference? if so, I guess that means I have to wrap them in shared_ptr's? what about shared_array?
This is sort of just an example...
orCode:typedef boost::unordered_map<std::string, std::string> Row; typedef std::vector<Row> RowList; RowList FetchRow(); RowList FetchRowList();
orCode:typedef boost::unordered_map<std::string, std::string> Row; typedef std::vector<Row> RowList; Row& FetchRow(); RowList& FetchRowList();
orCode:typedef boost::unordered_map<std::string, std::string> Row; typedef std::vector<boost::shared_ptr<Row> > RowList; Row FetchRowList(); RowList FetchRowList();
orCode:typedef boost::unordered_map<std::string, std::string> Row; typedef std::vector<boost::shared_ptr<Row> > RowList; Row& FetchRow(); RowList& FetchRowList();
orCode:typedef boost::unordered_map<std::string, std::string> Row; typedef boost::shared_ptr<Row> pRow; typedef std::vector<Row> RowList; pRow FetchRow(); RowList FetchRowList();
orCode:typedef boost::unordered_map<std::string, std::string> Row; typedef boost::shared_ptr<Row> pRow; typedef std::vector<pRow> RowList; pRow FetchRow(); RowList& FetchRowList();
etc.Code:typedef boost::unordered_map<std::string, std::string> Row; typedef boost::shared_ptr<Row> pRow; typedef std::vector<pRow> RowList; typedef boost::shared_array<RowList> pRowList; pRow FetchRow(); pRowList FetchRowList(); //pRowList r(new RowList); return r;
Last one?
Thanks guys!!



LinkBack URL
About LinkBacks



