summaryrefslogtreecommitdiffstats
path: root/Source/cmExportSetMap.h
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2019-09-06 10:16:02 (GMT)
committerTushar Maheshwari <tushar27192@gmail.com>2019-09-19 13:50:29 (GMT)
commit9b8a1f7c28deac892493b0a5548b08b2003238ea (patch)
tree72c22cba36879fded9bf99b94e75c2329281a048 /Source/cmExportSetMap.h
parentcca5897318d5c747078f79cd5bb45ba74955102a (diff)
downloadCMake-9b8a1f7c28deac892493b0a5548b08b2003238ea.zip
CMake-9b8a1f7c28deac892493b0a5548b08b2003238ea.tar.gz
CMake-9b8a1f7c28deac892493b0a5548b08b2003238ea.tar.bz2
cmExportSetMap: improve ownership of cmExportSet
- use `std::piecewise_construct` to fix gcc-4.8 build. - can use `emplace(name, name)` gcc-6 onwards.
Diffstat (limited to 'Source/cmExportSetMap.h')
-rw-r--r--Source/cmExportSetMap.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h
index 0ef07ef..5764c0b 100644
--- a/Source/cmExportSetMap.h
+++ b/Source/cmExportSetMap.h
@@ -8,12 +8,12 @@
#include <map>
#include <string>
-class cmExportSet;
+#include "cmExportSet.h"
/// A name -> cmExportSet map with overloaded operator[].
-class cmExportSetMap : public std::map<std::string, cmExportSet*>
+class cmExportSetMap : public std::map<std::string, cmExportSet>
{
- using derived = std::map<std::string, cmExportSet*>;
+ using derived = std::map<std::string, cmExportSet>;
public:
/** \brief Overloaded operator[].
@@ -21,17 +21,7 @@ public:
* The operator is overloaded because cmExportSet has no default constructor:
* we do not want unnamed export sets.
*/
- cmExportSet* operator[](const std::string& name);
-
- void clear();
-
- cmExportSetMap();
-
- /// Overloaded destructor deletes all member export sets.
- ~cmExportSetMap();
-
- cmExportSetMap(const cmExportSetMap&) = delete;
- cmExportSetMap& operator=(const cmExportSetMap&) = delete;
+ cmExportSet& operator[](const std::string& name);
};
#endif