summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.cxx2
-rw-r--r--Source/CPack/cpack.cxx2
-rw-r--r--Source/CTest/cmCTestBZR.cxx4
-rw-r--r--Source/CTest/cmCTestCVS.cxx2
-rw-r--r--Source/CTest/cmCTestGIT.cxx4
-rw-r--r--Source/CTest/cmCTestHG.cxx4
-rw-r--r--Source/CTest/cmCTestP4.cxx4
-rw-r--r--Source/CTest/cmCTestSVN.cxx4
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx4
-rw-r--r--Source/CTest/cmParseBlanketJSCoverage.cxx4
-rw-r--r--Source/CTest/cmParseCoberturaCoverage.cxx4
-rw-r--r--Source/CTest/cmParseDelphiCoverage.cxx4
-rw-r--r--Source/CTest/cmParseJacocoCoverage.cxx4
-rw-r--r--Source/cmAffinity.cxx2
-rw-r--r--Source/cmAlgorithms.h6
-rw-r--r--Source/cmArchiveWrite.cxx2
-rw-r--r--Source/cmCPluginAPI.cxx6
-rw-r--r--Source/cmCTest.h2
-rw-r--r--Source/cmComputeComponentGraph.h6
-rw-r--r--Source/cmComputeLinkDepends.h8
-rw-r--r--Source/cmComputeLinkInformation.h2
-rw-r--r--Source/cmComputeTargetDepends.h6
-rw-r--r--Source/cmConditionEvaluator.h2
-rw-r--r--Source/cmCustomCommandLines.h12
-rw-r--r--Source/cmDefinitions.h2
-rw-r--r--Source/cmDependsFortran.cxx8
-rw-r--r--Source/cmELF.cxx32
-rw-r--r--Source/cmExecProgramCommand.cxx2
-rw-r--r--Source/cmFileCommand.cxx2
-rw-r--r--Source/cmFileLockPool.h12
-rw-r--r--Source/cmFileLockResult.h2
-rw-r--r--Source/cmFileTime.h2
-rw-r--r--Source/cmFindLibraryCommand.cxx2
-rw-r--r--Source/cmFindPackageCommand.h4
-rw-r--r--Source/cmFortranParser.h2
-rw-r--r--Source/cmGeneratedFileStream.h4
-rw-r--r--Source/cmGeneratorExpressionParser.cxx4
-rw-r--r--Source/cmGeneratorTarget.cxx2
-rw-r--r--Source/cmGlobalGenerator.h4
-rw-r--r--Source/cmGlobalGhsMultiGenerator.h2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx1
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx1
-rw-r--r--Source/cmInstallTargetGenerator.h6
-rw-r--r--Source/cmInstalledFile.cxx1
-rw-r--r--Source/cmInstalledFile.h9
-rw-r--r--Source/cmLinkLineComputer.cxx2
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx4
-rw-r--r--Source/cmLinkedTree.h6
-rw-r--r--Source/cmListCommand.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx2
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx1
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmMakefile.h10
-rw-r--r--Source/cmNinjaTypes.h4
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx2
-rw-r--r--Source/cmParseArgumentsCommand.cxx8
-rw-r--r--Source/cmProcessTools.h2
-rw-r--r--Source/cmQtAutoGen.cxx4
-rw-r--r--Source/cmQtAutoGen.h2
-rw-r--r--Source/cmQtAutoGenInitializer.h2
-rw-r--r--Source/cmQtAutoGenerator.cxx2
-rw-r--r--Source/cmQtAutoMocUic.h6
-rw-r--r--Source/cmScriptGenerator.h2
-rw-r--r--Source/cmSourceGroupCommand.h2
-rw-r--r--Source/cmStatePrivate.h2
-rw-r--r--Source/cmStateTypes.h2
-rw-r--r--Source/cmString.hxx6
-rw-r--r--Source/cmStringAlgorithms.h2
-rw-r--r--Source/cmSystemTools.h4
-rw-r--r--Source/cmTarget.h2
-rw-r--r--Source/cmUVHandlePtr.h4
-rw-r--r--Source/cmUuid.cxx2
-rw-r--r--Source/cmVariableWatch.h9
-rw-r--r--Source/cmWorkerPool.cxx6
-rw-r--r--Source/cmWorkerPool.h2
-rw-r--r--Source/cmXMLParser.h2
-rw-r--r--Source/cmake.h6
-rw-r--r--Source/cmcmd.cxx4
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx2
80 files changed, 164 insertions, 162 deletions
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index a35977c6f7..bbba8a19d5 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -131,7 +131,7 @@ public:
class ManifestKeyListValue : public ManifestKey
{
public:
- typedef std::vector<std::string> VList;
+ using VList = std::vector<std::string>;
VList value;
ManifestKeyListValue(const std::string& k)
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 69dac885f0..b4b320df7c 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -157,7 +157,7 @@ int main(int argc, char const* const* argv)
cmsys::CommandLineArguments arg;
arg.Initialize(argc, argv);
- typedef cmsys::CommandLineArguments argT;
+ using argT = cmsys::CommandLineArguments;
// Help arguments
arg.AddArgument("--help", argT::NO_ARGUMENT, &help, "CPack help");
arg.AddArgument("--help-full", argT::SPACE_ARGUMENT, &helpFull,
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index b957856e85..52dc0ac21d 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -200,8 +200,8 @@ public:
private:
cmCTestBZR* BZR;
- typedef cmCTestBZR::Revision Revision;
- typedef cmCTestBZR::Change Change;
+ using Revision = cmCTestBZR::Revision;
+ using Change = cmCTestBZR::Change;
Revision Rev;
std::vector<Change> Changes;
Change CurChange;
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
index 560c16919b..b9b90c867c 100644
--- a/Source/CTest/cmCTestCVS.cxx
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -105,7 +105,7 @@ bool cmCTestCVS::UpdateImpl()
class cmCTestCVS::LogParser : public cmCTestVC::LineParser
{
public:
- typedef cmCTestCVS::Revision Revision;
+ using Revision = cmCTestCVS::Revision;
LogParser(cmCTestCVS* cvs, const char* prefix, std::vector<Revision>& revs)
: CVS(cvs)
, Revisions(revs)
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index f7319efa62..3ae464dba2 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -333,7 +333,7 @@ public:
this->SetLog(&git->Log, prefix);
}
- typedef cmCTestGIT::Change Change;
+ using Change = cmCTestGIT::Change;
std::vector<Change> Changes;
protected:
@@ -456,7 +456,7 @@ public:
}
private:
- typedef cmCTestGIT::Revision Revision;
+ using Revision = cmCTestGIT::Revision;
enum SectionType
{
SectionHeader,
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index ba2252a303..297077e1f4 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -174,8 +174,8 @@ public:
private:
cmCTestHG* HG;
- typedef cmCTestHG::Revision Revision;
- typedef cmCTestHG::Change Change;
+ using Revision = cmCTestHG::Revision;
+ using Change = cmCTestHG::Change;
Revision Rev;
std::vector<Change> Changes;
Change CurChange;
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 64354e863a..9bca7cb7e0 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -204,8 +204,8 @@ private:
cmsys::RegularExpression RegexDiff;
cmCTestP4* P4;
- typedef cmCTestP4::Revision Revision;
- typedef cmCTestP4::Change Change;
+ using Revision = cmCTestP4::Revision;
+ using Change = cmCTestP4::Change;
std::vector<Change> Changes;
enum SectionType
{
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index dc1472b91e..6d8077fd4a 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -307,8 +307,8 @@ private:
cmCTestSVN* SVN;
cmCTestSVN::SVNInfo& SVNRepo;
- typedef cmCTestSVN::Revision Revision;
- typedef cmCTestSVN::Change Change;
+ using Revision = cmCTestSVN::Revision;
+ using Change = cmCTestSVN::Change;
Revision Rev;
std::vector<Change> Changes;
Change CurChange;
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index a178b4439f..f215911927 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -26,7 +26,7 @@
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
-typedef std::vector<char> cmCTestSubmitHandlerVectorOfChar;
+using cmCTestSubmitHandlerVectorOfChar = std::vector<char>;
class cmCTestSubmitHandler::ResponseParser : public cmXMLParser
{
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b90209edd4..2b5a4060de 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -939,9 +939,9 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const
// Prepare some maps to help us find setup and cleanup tests for
// any given fixture
- typedef ListOfTests::const_iterator TestIterator;
+ using TestIterator = ListOfTests::const_iterator;
typedef std::multimap<std::string, TestIterator> FixtureDependencies;
- typedef FixtureDependencies::const_iterator FixtureDepsIterator;
+ using FixtureDepsIterator = FixtureDependencies::const_iterator;
FixtureDependencies fixtureSetups;
FixtureDependencies fixtureCleanups;
diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx
index b74decbd70..191100c260 100644
--- a/Source/CTest/cmParseBlanketJSCoverage.cxx
+++ b/Source/CTest/cmParseBlanketJSCoverage.cxx
@@ -13,8 +13,8 @@
class cmParseBlanketJSCoverage::JSONParser
{
public:
- typedef cmCTestCoverageHandlerContainer::SingleFileCoverageVector
- FileLinesType;
+ using FileLinesType =
+ cmCTestCoverageHandlerContainer::SingleFileCoverageVector;
JSONParser(cmCTestCoverageHandlerContainer& cont)
: Coverage(cont)
{
diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx
index e0186c9b9f..e4f353b68a 100644
--- a/Source/CTest/cmParseCoberturaCoverage.cxx
+++ b/Source/CTest/cmParseCoberturaCoverage.cxx
@@ -142,8 +142,8 @@ private:
bool InSource = false;
bool SkipThisClass = false;
std::vector<std::string> FilePaths;
- typedef cmCTestCoverageHandlerContainer::SingleFileCoverageVector
- FileLinesType;
+ using FileLinesType =
+ cmCTestCoverageHandlerContainer::SingleFileCoverageVector;
cmCTest* CTest;
cmCTestCoverageHandlerContainer& Coverage;
std::string CurFileName;
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
index 9eda6f8f3d..e8a184ab57 100644
--- a/Source/CTest/cmParseDelphiCoverage.cxx
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -12,8 +12,8 @@
class cmParseDelphiCoverage::HTMLParser
{
public:
- typedef cmCTestCoverageHandlerContainer::SingleFileCoverageVector
- FileLinesType;
+ using FileLinesType =
+ cmCTestCoverageHandlerContainer::SingleFileCoverageVector;
HTMLParser(cmCTest* ctest, cmCTestCoverageHandlerContainer& cont)
: CTest(ctest)
, Coverage(cont)
diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx
index 374acade01..6a2d0cc2e5 100644
--- a/Source/CTest/cmParseJacocoCoverage.cxx
+++ b/Source/CTest/cmParseJacocoCoverage.cxx
@@ -133,8 +133,8 @@ private:
std::string FilePath;
std::string PackagePath;
std::string PackageName;
- typedef cmCTestCoverageHandlerContainer::SingleFileCoverageVector
- FileLinesType;
+ using FileLinesType =
+ cmCTestCoverageHandlerContainer::SingleFileCoverageVector;
cmCTest* CTest;
cmCTestCoverageHandlerContainer& Coverage;
};
diff --git a/Source/cmAffinity.cxx b/Source/cmAffinity.cxx
index 09b029866d..fa5e4b900d 100644
--- a/Source/cmAffinity.cxx
+++ b/Source/cmAffinity.cxx
@@ -20,7 +20,7 @@
# include <sys/param.h>
# endif
# if defined(__linux__)
-typedef cpu_set_t cm_cpuset_t;
+using cm_cpuset_t = cpu_set_t;
# else
typedef cpuset_t cm_cpuset_t;
# endif
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index 59aa86fa67..6775f9d3b1 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -115,7 +115,7 @@ FwdIt RemoveN(FwdIt i1, FwdIt i2, size_t n)
template <typename Range>
struct BinarySearcher
{
- typedef typename Range::value_type argument_type;
+ using argument_type = typename Range::value_type;
BinarySearcher(Range const& r)
: m_range(r)
{
@@ -132,8 +132,8 @@ private:
}
class cmListFileBacktrace;
-typedef cmRange<std::vector<cmListFileBacktrace>::const_iterator>
- cmBacktraceRange;
+using cmBacktraceRange =
+ cmRange<std::vector<cmListFileBacktrace>::const_iterator>;
template <typename Range>
void cmDeleteAll(Range const& r)
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index a063fd914f..a6c25e12e9 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -333,7 +333,7 @@ bool cmArchiveWrite::AddData(const char* file, size_t size)
char buffer[16384];
size_t nleft = size;
while (nleft > 0) {
- typedef std::streamsize ssize_type;
+ using ssize_type = std::streamsize;
size_t const nnext = nleft > sizeof(buffer) ? sizeof(buffer) : nleft;
ssize_type const nnext_s = static_cast<ssize_type>(nnext);
fin.read(buffer, nnext_s);
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index b20f5959ff..e814d67122 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -490,9 +490,9 @@ class cmCPluginAPISourceFileMap
: public std::map<cmSourceFile*, cmCPluginAPISourceFile*>
{
public:
- typedef std::map<cmSourceFile*, cmCPluginAPISourceFile*> derived;
- typedef derived::iterator iterator;
- typedef derived::value_type value_type;
+ using derived = std::map<cmSourceFile*, cmCPluginAPISourceFile*>;
+ using iterator = derived::iterator;
+ using value_type = derived::value_type;
cmCPluginAPISourceFileMap() = default;
~cmCPluginAPISourceFileMap()
{
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 7fe3455949..41dac852e0 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -41,7 +41,7 @@ class cmXMLWriter;
class cmCTest
{
public:
- typedef cmProcessOutput::Encoding Encoding;
+ using Encoding = cmProcessOutput::Encoding;
/** Enumerate parts of the testing and submission process. */
enum Part
{
diff --git a/Source/cmComputeComponentGraph.h b/Source/cmComputeComponentGraph.h
index 8cd4fe73a9..5493769eab 100644
--- a/Source/cmComputeComponentGraph.h
+++ b/Source/cmComputeComponentGraph.h
@@ -24,9 +24,9 @@ class cmComputeComponentGraph
{
public:
// Represent the graph with an adjacency list.
- typedef cmGraphNodeList NodeList;
- typedef cmGraphEdgeList EdgeList;
- typedef cmGraphAdjacencyList Graph;
+ using NodeList = cmGraphNodeList;
+ using EdgeList = cmGraphEdgeList;
+ using Graph = cmGraphAdjacencyList;
cmComputeComponentGraph(Graph const& input);
~cmComputeComponentGraph();
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 839c27a849..f0ac7714d8 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -44,7 +44,7 @@ public:
bool IsFlag = false;
};
- typedef std::vector<LinkEntry> EntryVector;
+ using EntryVector = std::vector<LinkEntry>;
EntryVector const& Compute();
void SetOldLinkDirMode(bool b);
@@ -111,9 +111,9 @@ private:
void InferDependencies();
// Ordering constraint graph adjacency list.
- typedef cmGraphNodeList NodeList;
- typedef cmGraphEdgeList EdgeList;
- typedef cmGraphAdjacencyList Graph;
+ using NodeList = cmGraphNodeList;
+ using EdgeList = cmGraphEdgeList;
+ using Graph = cmGraphAdjacencyList;
Graph EntryConstraintGraph;
void CleanConstraintGraph();
void DisplayConstraintGraph();
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 784d3fa80f..0f71381061 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -42,7 +42,7 @@ public:
bool IsPath = true;
cmGeneratorTarget const* Target = nullptr;
};
- typedef std::vector<Item> ItemVector;
+ using ItemVector = std::vector<Item>;
ItemVector const& GetItems() const;
std::vector<std::string> const& GetDirectories() const;
std::vector<std::string> const& GetDepends() const;
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h
index 3840bd7526..6087574d22 100644
--- a/Source/cmComputeTargetDepends.h
+++ b/Source/cmComputeTargetDepends.h
@@ -70,9 +70,9 @@ private:
// Represent the target dependency graph. The entry at each
// top-level index corresponds to a depender whose dependencies are
// listed.
- typedef cmGraphNodeList NodeList;
- typedef cmGraphEdgeList EdgeList;
- typedef cmGraphAdjacencyList Graph;
+ using NodeList = cmGraphNodeList;
+ using EdgeList = cmGraphEdgeList;
+ using Graph = cmGraphAdjacencyList;
Graph InitialGraph;
Graph FinalGraph;
void DisplayGraph(Graph const& graph, const std::string& name);
diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h
index 59e1396f68..082534ce84 100644
--- a/Source/cmConditionEvaluator.h
+++ b/Source/cmConditionEvaluator.h
@@ -19,7 +19,7 @@ class cmMakefile;
class cmConditionEvaluator
{
public:
- typedef std::list<cmExpandedCommandArgument> cmArgumentList;
+ using cmArgumentList = std::list<cmExpandedCommandArgument>;
cmConditionEvaluator(cmMakefile& makefile, cmListFileContext context,
cmListFileBacktrace bt);
diff --git a/Source/cmCustomCommandLines.h b/Source/cmCustomCommandLines.h
index 36838f23fd..35a15ba2a8 100644
--- a/Source/cmCustomCommandLines.h
+++ b/Source/cmCustomCommandLines.h
@@ -12,18 +12,18 @@
class cmCustomCommandLine : public std::vector<std::string>
{
public:
- typedef std::vector<std::string> Superclass;
- typedef Superclass::iterator iterator;
- typedef Superclass::const_iterator const_iterator;
+ using Superclass = std::vector<std::string>;
+ using iterator = Superclass::iterator;
+ using const_iterator = Superclass::const_iterator;
};
/** Data structure to represent a list of command lines. */
class cmCustomCommandLines : public std::vector<cmCustomCommandLine>
{
public:
- typedef std::vector<cmCustomCommandLine> Superclass;
- typedef Superclass::iterator iterator;
- typedef Superclass::const_iterator const_iterator;
+ using Superclass = std::vector<cmCustomCommandLine>;
+ using iterator = Superclass::iterator;
+ using const_iterator = Superclass::const_iterator;
};
#endif
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index b4d6419cc2..008821dda1 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -24,7 +24,7 @@
*/
class cmDefinitions
{
- typedef cmLinkedTree<cmDefinitions>::iterator StackIter;
+ using StackIter = cmLinkedTree<cmDefinitions>::iterator;
public:
// -- Static member functions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 6c77db9b9a..8df993882a 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -170,7 +170,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
}
// Actually write dependencies to the streams.
- typedef cmDependsFortranInternals::ObjectInfoMap ObjectInfoMap;
+ using ObjectInfoMap = cmDependsFortranInternals::ObjectInfoMap;
ObjectInfoMap const& objInfo = this->Internal->ObjectInfo;
for (auto const& i : objInfo) {
if (!this->WriteDependenciesReal(i.first, i.second, mod_dir, stamp_dir,
@@ -222,7 +222,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
void cmDependsFortran::LocateModules()
{
// Collect the set of modules provided and required by all sources.
- typedef cmDependsFortranInternals::ObjectInfoMap ObjectInfoMap;
+ using ObjectInfoMap = cmDependsFortranInternals::ObjectInfoMap;
ObjectInfoMap const& objInfo = this->Internal->ObjectInfo;
for (auto const& infoI : objInfo) {
cmFortranSourceInfo const& info = infoI.second;
@@ -303,7 +303,7 @@ void cmDependsFortran::ConsiderModule(const std::string& name,
const std::string& stampDir)
{
// Locate each required module.
- typedef cmDependsFortranInternals::TargetRequiresMap TargetRequiresMap;
+ using TargetRequiresMap = cmDependsFortranInternals::TargetRequiresMap;
TargetRequiresMap::iterator required =
this->Internal->TargetRequires.find(name);
if (required != this->Internal->TargetRequires.end() &&
@@ -321,7 +321,7 @@ bool cmDependsFortran::WriteDependenciesReal(std::string const& obj,
std::ostream& makeDepends,
std::ostream& internalDepends)
{
- typedef cmDependsFortranInternals::TargetRequiresMap TargetRequiresMap;
+ using TargetRequiresMap = cmDependsFortranInternals::TargetRequiresMap;
// Get the source file for this object.
std::string const& src = info.Source;
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 096016d467..425f1a8c42 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -102,7 +102,7 @@ void cmELFByteSwap(T& x)
class cmELFInternal
{
public:
- typedef cmELF::StringEntry StringEntry;
+ using StringEntry = cmELF::StringEntry;
enum ByteOrderType
{
ByteOrderMSB,
@@ -200,11 +200,11 @@ protected:
// Configure the implementation template for 32-bit ELF files.
struct cmELFTypes32
{
- typedef Elf32_Ehdr ELF_Ehdr;
- typedef Elf32_Shdr ELF_Shdr;
- typedef Elf32_Dyn ELF_Dyn;
- typedef Elf32_Half ELF_Half;
- typedef KWIML_INT_uint32_t tagtype;
+ using ELF_Ehdr = Elf32_Ehdr;
+ using ELF_Shdr = Elf32_Shdr;
+ using ELF_Dyn = Elf32_Dyn;
+ using ELF_Half = Elf32_Half;
+ using tagtype = ::uint32_t;
static const char* GetName() { return "32-bit"; }
};
@@ -212,11 +212,11 @@ struct cmELFTypes32
#ifndef _SCO_DS
struct cmELFTypes64
{
- typedef Elf64_Ehdr ELF_Ehdr;
- typedef Elf64_Shdr ELF_Shdr;
- typedef Elf64_Dyn ELF_Dyn;
- typedef Elf64_Half ELF_Half;
- typedef KWIML_INT_uint64_t tagtype;
+ using ELF_Ehdr = Elf64_Ehdr;
+ using ELF_Shdr = Elf64_Shdr;
+ using ELF_Dyn = Elf64_Dyn;
+ using ELF_Half = Elf64_Half;
+ using tagtype = ::uint64_t;
static const char* GetName() { return "64-bit"; }
};
#endif
@@ -227,11 +227,11 @@ class cmELFInternalImpl : public cmELFInternal
{
public:
// Copy the ELF file format types from our configuration parameter.
- typedef typename Types::ELF_Ehdr ELF_Ehdr;
- typedef typename Types::ELF_Shdr ELF_Shdr;
- typedef typename Types::ELF_Dyn ELF_Dyn;
- typedef typename Types::ELF_Half ELF_Half;
- typedef typename Types::tagtype tagtype;
+ using ELF_Ehdr = typename Types::ELF_Ehdr;
+ using ELF_Shdr = typename Types::ELF_Shdr;
+ using ELF_Dyn = typename Types::ELF_Dyn;
+ using ELF_Half = typename Types::ELF_Half;
+ using tagtype = typename Types::tagtype;
// Construct with a stream and byte swap indicator.
cmELFInternalImpl(cmELF* external, std::unique_ptr<std::istream> fin,
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 7f4164079f..74e9c55814 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -11,7 +11,7 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-typedef cmProcessOutput::Encoding Encoding;
+using Encoding = cmProcessOutput::Encoding;
namespace {
bool RunCommand(std::string command, std::string& output, int& retVal,
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 5589537d9a..36a7dc3f49 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1421,7 +1421,7 @@ bool HandleNativePathCommand(std::vector<std::string> const& args,
#if !defined(CMAKE_BOOTSTRAP)
// Stuff for curl download/upload
-typedef std::vector<char> cmFileCommandVectorOfChar;
+using cmFileCommandVectorOfChar = std::vector<char>;
size_t cmWriteToFileCallback(void* ptr, size_t size, size_t nmemb, void* data)
{
diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h
index 41203baac9..dae68dd011 100644
--- a/Source/cmFileLockPool.h
+++ b/Source/cmFileLockPool.h
@@ -72,17 +72,17 @@ private:
bool IsAlreadyLocked(const std::string& filename) const;
private:
- typedef std::vector<cmFileLock*> List;
- typedef List::iterator It;
- typedef List::const_iterator CIt;
+ using List = std::vector<cmFileLock*>;
+ using It = List::iterator;
+ using CIt = List::const_iterator;
List Locks;
};
- typedef std::vector<ScopePool*> List;
+ using List = std::vector<ScopePool*>;
- typedef List::iterator It;
- typedef List::const_iterator CIt;
+ using It = List::iterator;
+ using CIt = List::const_iterator;
List FunctionScopes;
List FileScopes;
diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h
index 8b4929ae10..c452814509 100644
--- a/Source/cmFileLockResult.h
+++ b/Source/cmFileLockResult.h
@@ -21,7 +21,7 @@ public:
#if defined(_WIN32)
typedef DWORD Error;
#else
- typedef int Error;
+ using Error = int;
#endif
/**
diff --git a/Source/cmFileTime.h b/Source/cmFileTime.h
index d4de4e0336..e9a85598ac 100644
--- a/Source/cmFileTime.h
+++ b/Source/cmFileTime.h
@@ -14,7 +14,7 @@
class cmFileTime
{
public:
- typedef long long NSC;
+ using NSC = long long;
static constexpr NSC NsPerS = 1000000000;
cmFileTime() = default;
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 924a14ee96..92c64c853a 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -191,7 +191,7 @@ struct cmFindLibraryHelper
std::string SuffixRegexStr;
// Keep track of the best library file found so far.
- typedef std::vector<std::string>::size_type size_type;
+ using size_type = std::vector<std::string>::size_type;
std::string BestPath;
// Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index f6645ae1da..d57b38a339 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -235,8 +235,8 @@ namespace std {
template <>
struct hash<cmFindPackageCommand::ConfigFileInfo>
{
- typedef cmFindPackageCommand::ConfigFileInfo argument_type;
- typedef size_t result_type;
+ using argument_type = cmFindPackageCommand::ConfigFileInfo;
+ using result_type = size_t;
result_type operator()(argument_type const& s) const noexcept
{
diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h
index 6a33be571a..825876c839 100644
--- a/Source/cmFortranParser.h
+++ b/Source/cmFortranParser.h
@@ -15,7 +15,7 @@
#include <stddef.h> /* size_t */
/* Forward declare parser object type. */
-typedef struct cmFortranParser_s cmFortranParser;
+using cmFortranParser = struct cmFortranParser_s;
/* Functions to enter/exit #include'd files in order. */
bool cmFortranParser_FilePush(cmFortranParser* parser, const char* fname);
diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h
index 5b1eb51531..3d94cdcb38 100644
--- a/Source/cmGeneratedFileStream.h
+++ b/Source/cmGeneratedFileStream.h
@@ -72,8 +72,8 @@ class cmGeneratedFileStream
, public cmsys::ofstream
{
public:
- typedef cmsys::ofstream Stream;
- typedef codecvt::Encoding Encoding;
+ using Stream = cmsys::ofstream;
+ using Encoding = codecvt::Encoding;
/**
* This constructor prepares a default stream. The open method must
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx
index 304378dfeb..e7effcab89 100644
--- a/Source/cmGeneratorExpressionParser.cxx
+++ b/Source/cmGeneratorExpressionParser.cxx
@@ -174,8 +174,8 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
if (!parameters.empty()) {
extendText(result, colonToken);
- typedef std::vector<cmGeneratorExpressionEvaluator*> EvaluatorVector;
- typedef std::vector<cmGeneratorExpressionToken> TokenVector;
+ using EvaluatorVector = std::vector<cmGeneratorExpressionEvaluator*>;
+ using TokenVector = std::vector<cmGeneratorExpressionToken>;
std::vector<EvaluatorVector>::const_iterator pit = parameters.begin();
const std::vector<EvaluatorVector>::const_iterator pend =
parameters.end();
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 8896e153ca..48ffcecc7a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2602,7 +2602,7 @@ private:
cmMakefile* Makefile;
cmLocalGenerator* LocalGenerator;
cmGlobalGenerator const* GlobalGenerator;
- typedef cmGeneratorTarget::SourceEntry SourceEntry;
+ using SourceEntry = cmGeneratorTarget::SourceEntry;
SourceEntry* CurrentEntry;
std::queue<cmSourceFile*> SourceQueue;
std::set<cmSourceFile*> SourcesQueued;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 830974d229..36e5d0e7b0 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -376,7 +376,7 @@ public:
virtual std::string GetEditCacheCommand() const { return ""; }
// Class to track a set of dependencies.
- typedef cmTargetDependSet TargetDependSet;
+ using TargetDependSet = cmTargetDependSet;
// what targets does the specified target depend on directly
// via a target_link_libraries or add_dependencies
@@ -476,7 +476,7 @@ public:
int RecursionDepth;
protected:
- typedef std::vector<cmLocalGenerator*> GeneratorVector;
+ using GeneratorVector = std::vector<cmLocalGenerator*>;
// for a project collect all its targets by following depend
// information, and also collect all the targets
void GetTargetSets(TargetDependSet& projectTargets,
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index 98358c74d1..9b5bf634ec 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -153,7 +153,7 @@ class cmGlobalGhsMultiGenerator::OrderedTargetDependSet
derived;
public:
- typedef cmGlobalGenerator::TargetDependSet TargetDependSet;
+ using TargetDependSet = cmGlobalGenerator::TargetDependSet;
OrderedTargetDependSet(TargetDependSet const&, std::string const& first);
};
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 26ceedd071..b3557758d7 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -3,6 +3,7 @@
#include "cmGlobalVisualStudio7Generator.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index f4c47ce4a3..5e6010896a 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -4,6 +4,7 @@
#include "cmDocumentationEntry.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h
index 9ccad63758..3097bec00f 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -74,9 +74,9 @@ protected:
void GenerateScriptForConfigObjectLibrary(std::ostream& os,
const std::string& config,
Indent indent);
- typedef void (cmInstallTargetGenerator::*TweakMethod)(std::ostream&, Indent,
- const std::string&,
- std::string const&);
+ using TweakMethod = void (cmInstallTargetGenerator::*)(std::ostream&, Indent,
+ const std::string&,
+ const std::string&);
void AddTweak(std::ostream& os, Indent indent, const std::string& config,
std::string const& file, TweakMethod tweak);
void AddTweak(std::ostream& os, Indent indent, const std::string& config,
diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx
index 1e6c385d92..11f6efb956 100644
--- a/Source/cmInstalledFile.cxx
+++ b/Source/cmInstalledFile.cxx
@@ -3,6 +3,7 @@
#include "cmInstalledFile.h"
#include "cmAlgorithms.h"
+#include "cmGeneratorExpression.h"
#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h
index eb827be573..e00e6660d4 100644
--- a/Source/cmInstalledFile.h
+++ b/Source/cmInstalledFile.h
@@ -5,13 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGeneratorExpression.h"
-
#include <map>
#include <memory>
#include <string>
#include <vector>
+class cmCompiledGeneratorExpression;
class cmMakefile;
/** \class cmInstalledFile
@@ -22,10 +21,10 @@ class cmMakefile;
class cmInstalledFile
{
public:
- typedef std::unique_ptr<cmCompiledGeneratorExpression>
- CompiledGeneratorExpressionPtrType;
+ using CompiledGeneratorExpressionPtrType =
+ std::unique_ptr<cmCompiledGeneratorExpression>;
- typedef std::vector<cmCompiledGeneratorExpression*> ExpressionVectorType;
+ using ExpressionVectorType = std::vector<cmCompiledGeneratorExpression*>;
struct Property
{
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index 5e3c790874..91c551fb19 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -56,7 +56,7 @@ std::string cmLinkLineComputer::ConvertToLinkReference(
std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli)
{
std::string linkLibs;
- typedef cmComputeLinkInformation::ItemVector ItemVector;
+ using ItemVector = cmComputeLinkInformation::ItemVector;
ItemVector const& items = cli.GetItems();
for (auto const& item : items) {
if (item.Target &&
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 96af388d27..9c0e20f517 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -51,7 +51,7 @@ bool cmLinkLineDeviceComputer::ComputeRequiresDeviceLinking(
{
// Determine if this item might requires device linking.
// For this we only consider targets
- typedef cmComputeLinkInformation::ItemVector ItemVector;
+ using ItemVector = cmComputeLinkInformation::ItemVector;
ItemVector const& items = cli.GetItems();
std::string config = cli.GetConfig();
for (auto const& item : items) {
@@ -78,7 +78,7 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
// with device symbols only needs to be listed once as it doesn't
// care about link order.
std::set<std::string> emitted;
- typedef cmComputeLinkInformation::ItemVector ItemVector;
+ using ItemVector = cmComputeLinkInformation::ItemVector;
ItemVector const& items = cli.GetItems();
std::string config = cli.GetConfig();
bool skipItemAfterFramework = false;
diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h
index 099fb6d116..8b91162192 100644
--- a/Source/cmLinkedTree.h
+++ b/Source/cmLinkedTree.h
@@ -27,9 +27,9 @@
template <typename T>
class cmLinkedTree
{
- typedef typename std::vector<T>::size_type PositionType;
- typedef T* PointerType;
- typedef T& ReferenceType;
+ using PositionType = typename std::vector<T>::size_type;
+ using PointerType = T*;
+ using ReferenceType = T&;
public:
class iterator
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index d2c051eae4..57eeedbadc 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -1080,7 +1080,7 @@ public:
};
protected:
- typedef std::string (*StringFilter)(const std::string& in);
+ using StringFilter = std::string (*)(const std::string&);
StringFilter GetCompareFilter(Compare compare)
{
return (compare == Compare::FILE_BASENAME) ? cmSystemTools::GetFilenameName
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index df1a5bd9a1..f0145c5240 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -323,7 +323,7 @@ void cmLocalGenerator::GenerateTestFiles()
tester->Compute(this);
tester->Generate(fout, config, configurationTypes);
}
- typedef std::vector<cmStateSnapshot> vec_t;
+ using vec_t = std::vector<cmStateSnapshot>;
vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren();
std::string parentBinDir = this->GetCurrentBinaryDirectory();
for (cmStateSnapshot const& i : children) {
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index f88c3e9b17..357ccc8875 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -4,6 +4,7 @@
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
+#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalVisualStudio7Generator.h"
#include "cmMakefile.h"
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4b26ec6fd9..dfe0086488 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4321,7 +4321,7 @@ bool cmMakefile::HasCMP0054AlreadyBeenReported(
void cmMakefile::RecordPolicies(cmPolicies::PolicyMap& pm)
{
/* Record the setting of every policy. */
- typedef cmPolicies::PolicyID PolicyID;
+ using PolicyID = cmPolicies::PolicyID;
for (PolicyID pid = cmPolicies::CMP0000; pid != cmPolicies::CMPCOUNT;
pid = PolicyID(pid + 1)) {
pm.Set(pid, this->GetPolicyStatus(pid));
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 6b9fa6b8c5..09f53c9627 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -385,7 +385,7 @@ public:
}
// -- List of targets
- typedef std::unordered_map<std::string, cmTarget> cmTargetMap;
+ using cmTargetMap = std::unordered_map<std::string, cmTarget>;
/** Get the target map */
cmTargetMap& GetTargets() { return this->Targets; }
/** Get the target map - const version */
@@ -914,7 +914,7 @@ protected:
mutable cmTargetMap Targets;
std::map<std::string, std::string> AliasTargets;
- typedef std::vector<cmSourceFile*> SourceFileVec;
+ using SourceFileVec = std::vector<cmSourceFile*>;
SourceFileVec SourceFiles;
// Because cmSourceFile names are compared in a fuzzy way (see
@@ -923,7 +923,7 @@ protected:
// Name portion of the cmSourceFileLocation and then compare on the list of
// cmSourceFiles that might match that name. Note that on platforms which
// have a case-insensitive filesystem we store the key in all lowercase.
- typedef std::unordered_map<std::string, SourceFileVec> SourceFileMap;
+ using SourceFileMap = std::unordered_map<std::string, SourceFileVec>;
SourceFileMap SourceFileSearchIndex;
// For "Known" paths we can store a direct filename to cmSourceFile map
@@ -997,7 +997,7 @@ private:
friend class cmParseFileScope;
std::vector<cmTarget*> ImportedTargetsOwned;
- typedef std::unordered_map<std::string, cmTarget*> TargetMap;
+ using TargetMap = std::unordered_map<std::string, cmTarget*>;
TargetMap ImportedTargets;
// Internal policy stack management.
@@ -1039,7 +1039,7 @@ private:
cmSourceFile* LinearGetSourceFileWithOutput(const std::string& cname) const;
// A map for fast output to input look up.
- typedef std::unordered_map<std::string, cmSourceFile*> OutputToSourceMap;
+ using OutputToSourceMap = std::unordered_map<std::string, cmSourceFile*>;
OutputToSourceMap OutputToSource;
void UpdateOutputToSourceMap(std::vector<std::string> const& outputs,
diff --git a/Source/cmNinjaTypes.h b/Source/cmNinjaTypes.h
index 52c05b62cd..89afbbddf3 100644
--- a/Source/cmNinjaTypes.h
+++ b/Source/cmNinjaTypes.h
@@ -17,8 +17,8 @@ enum cmNinjaTargetDepends
DependOnTargetOrdering
};
-typedef std::vector<std::string> cmNinjaDeps;
-typedef std::set<std::string> cmNinjaOuts;
+using cmNinjaDeps = std::vector<std::string>;
+using cmNinjaOuts = std::set<std::string>;
typedef std::map<std::string, std::string> cmNinjaVars;
class cmNinjaRule
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index 187f0ab8df..1a854dc465 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -36,7 +36,7 @@ public:
/**
* The set of files on which this one depends.
*/
- typedef std::set<cmDependInformation*> DependencySetType;
+ using DependencySetType = std::set<cmDependInformation*>;
DependencySetType DependencySet;
/**
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index aad9f74996..a4dd70d8fe 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -37,10 +37,10 @@ static std::string JoinList(std::vector<std::string> const& arg, bool escape)
namespace {
-typedef std::map<std::string, bool> options_map;
-typedef std::map<std::string, std::string> single_map;
-typedef std::map<std::string, std::vector<std::string>> multi_map;
-typedef std::set<std::string> options_set;
+using options_map = std::map<std::string, bool>;
+using single_map = std::map<std::string, std::string>;
+using multi_map = std::map<std::string, std::vector<std::string>>;
+using options_set = std::set<std::string>;
struct UserArgumentParser : public cmArgumentParser<void>
{
diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h
index 76163167a6..c205a8ff54 100644
--- a/Source/cmProcessTools.h
+++ b/Source/cmProcessTools.h
@@ -17,7 +17,7 @@
class cmProcessTools
{
public:
- typedef cmProcessOutput::Encoding Encoding;
+ using Encoding = cmProcessOutput::Encoding;
/** Abstract interface for process output parsers. */
class OutputParser
{
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index d890f8e001..83df3352c2 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -24,8 +24,8 @@ void MergeOptions(std::vector<std::string>& baseOpts,
std::vector<std::string> const& newOpts,
std::initializer_list<cm::string_view> valueOpts, bool isQt5)
{
- typedef std::vector<std::string>::iterator Iter;
- typedef std::vector<std::string>::const_iterator CIter;
+ using Iter = std::vector<std::string>::iterator;
+ using CIter = std::vector<std::string>::const_iterator;
if (newOpts.empty()) {
return;
}
diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h
index 939ceb3ea0..fb15586dd0 100644
--- a/Source/cmQtAutoGen.h
+++ b/Source/cmQtAutoGen.h
@@ -50,7 +50,7 @@ public:
std::string HelpOutput;
std::vector<std::string> ListOptions;
};
- typedef std::shared_ptr<CompilerFeatures> CompilerFeaturesHandle;
+ using CompilerFeaturesHandle = std::shared_ptr<CompilerFeatures>;
/// @brief AutoGen generator type
enum class GenT
diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h
index 65666a626a..84a27e4341 100644
--- a/Source/cmQtAutoGenInitializer.h
+++ b/Source/cmQtAutoGenInitializer.h
@@ -55,7 +55,7 @@ public:
bool MocIt = false;
bool UicIt = false;
};
- typedef std::unique_ptr<MUFile> MUFileHandle;
+ using MUFileHandle = std::unique_ptr<MUFile>;
/// @brief Abstract moc/uic/rcc generator variables base class
struct GenVarsT
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx
index 3bcc1c9a32..80b874156b 100644
--- a/Source/cmQtAutoGenerator.cxx
+++ b/Source/cmQtAutoGenerator.cxx
@@ -169,7 +169,7 @@ bool cmQtAutoGenerator::FileRead(std::string& content,
return false;
}
content.reserve(length);
- typedef std::istreambuf_iterator<char> IsIt;
+ using IsIt = std::istreambuf_iterator<char>;
content.assign(IsIt{ ifs }, IsIt{});
if (!ifs) {
content.clear();
diff --git a/Source/cmQtAutoMocUic.h b/Source/cmQtAutoMocUic.h
index f676c5718d..076e46087c 100644
--- a/Source/cmQtAutoMocUic.h
+++ b/Source/cmQtAutoMocUic.h
@@ -106,7 +106,7 @@ public:
std::vector<std::string> Depends;
} Uic;
};
- typedef std::shared_ptr<FileT> FileHandleT;
+ using FileHandleT = std::shared_ptr<FileT>;
typedef std::pair<FileHandleT, bool> GetOrInsertT;
public:
@@ -146,7 +146,7 @@ public:
bool Moc = false;
bool Uic = false;
};
- typedef std::shared_ptr<SourceFileT> SourceFileHandleT;
+ using SourceFileHandleT = std::shared_ptr<SourceFileT>;
typedef std::map<std::string, SourceFileHandleT> SourceFileMapT;
/**
@@ -159,7 +159,7 @@ public:
std::string IncludeString;
std::vector<SourceFileHandleT> IncluderFiles;
};
- typedef std::shared_ptr<MappingT> MappingHandleT;
+ using MappingHandleT = std::shared_ptr<MappingT>;
typedef std::map<std::string, MappingHandleT> MappingMapT;
/**
diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h
index e334d5badd..eee331f5c2 100644
--- a/Source/cmScriptGenerator.h
+++ b/Source/cmScriptGenerator.h
@@ -56,7 +56,7 @@ public:
std::vector<std::string> const& configurationTypes);
protected:
- typedef cmScriptGeneratorIndent Indent;
+ using Indent = cmScriptGeneratorIndent;
virtual void GenerateScript(std::ostream& os);
virtual void GenerateScriptConfigs(std::ostream& os, Indent indent);
virtual void GenerateScriptActions(std::ostream& os, Indent indent);
diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h
index eec4ec0d30..45438a9030 100644
--- a/Source/cmSourceGroupCommand.h
+++ b/Source/cmSourceGroupCommand.h
@@ -41,7 +41,7 @@ public:
private:
typedef std::map<std::string, std::vector<std::string>> ParsedArguments;
- typedef std::vector<std::string> ExpectedOptions;
+ using ExpectedOptions = std::vector<std::string>;
ExpectedOptions getExpectedOptions() const;
diff --git a/Source/cmStatePrivate.h b/Source/cmStatePrivate.h
index ec0ed6c932..4efaf97ebe 100644
--- a/Source/cmStatePrivate.h
+++ b/Source/cmStatePrivate.h
@@ -48,7 +48,7 @@ struct cmStateDetail::SnapshotDataType
struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap
{
- typedef cmPolicies::PolicyMap derived;
+ using derived = cmPolicies::PolicyMap;
PolicyStackEntry(bool w = false)
: Weak(w)
{
diff --git a/Source/cmStateTypes.h b/Source/cmStateTypes.h
index 7d6158e33f..d089ea73d5 100644
--- a/Source/cmStateTypes.h
+++ b/Source/cmStateTypes.h
@@ -10,7 +10,7 @@
namespace cmStateDetail {
struct SnapshotDataType;
-typedef cmLinkedTree<cmStateDetail::SnapshotDataType>::iterator PositionType;
+using PositionType = cmLinkedTree<cmStateDetail::SnapshotDataType>::iterator;
}
namespace cmStateEnums {
diff --git a/Source/cmString.hxx b/Source/cmString.hxx
index 226ac67b22..050a2fdb71 100644
--- a/Source/cmString.hxx
+++ b/Source/cmString.hxx
@@ -714,7 +714,7 @@ template <typename T>
struct StringAdd
{
static const bool value = AsStringView<T>::value;
- typedef string_view temp_type;
+ using temp_type = string_view;
template <typename S>
static temp_type temp(S&& s)
{
@@ -802,8 +802,8 @@ namespace std {
template <>
struct hash<cm::String>
{
- typedef cm::String argument_type;
- typedef size_t result_type;
+ using argument_type = cm::String;
+ using result_type = size_t;
result_type operator()(argument_type const& s) const noexcept
{
diff --git a/Source/cmStringAlgorithms.h b/Source/cmStringAlgorithms.h
index 5b8b878c4c..7f442d8489 100644
--- a/Source/cmStringAlgorithms.h
+++ b/Source/cmStringAlgorithms.h
@@ -16,7 +16,7 @@
#include <vector>
/** String range type. */
-typedef cmRange<std::vector<std::string>::const_iterator> cmStringRange;
+using cmStringRange = cmRange<std::vector<std::string>::const_iterator>;
/** Callable string comparison struct. */
struct cmStrCmp
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 953a358b72..863db3f736 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -25,8 +25,8 @@
class cmSystemTools : public cmsys::SystemTools
{
public:
- typedef cmsys::SystemTools Superclass;
- typedef cmProcessOutput::Encoding Encoding;
+ using Superclass = cmsys::SystemTools;
+ using Encoding = cmProcessOutput::Encoding;
/**
* Look for and replace registry values in a string
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 783c278493..fa420afc93 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -108,7 +108,7 @@ public:
//! how we identify a library, by name and type
typedef std::pair<std::string, cmTargetLinkLibraryType> LibraryID;
- typedef std::vector<LibraryID> LinkLibraryVectorType;
+ using LinkLibraryVectorType = std::vector<LibraryID>;
LinkLibraryVectorType const& GetOriginalLinkLibraries() const;
//! Clear the dependency information recorded for this target, if any.
diff --git a/Source/cmUVHandlePtr.h b/Source/cmUVHandlePtr.h
index c09e4bfdff..3083b60c89 100644
--- a/Source/cmUVHandlePtr.h
+++ b/Source/cmUVHandlePtr.h
@@ -240,8 +240,8 @@ struct uv_tty_ptr : public uv_handle_ptr_<uv_tty_t>
int init(uv_loop_t& loop, int fd, int readable, void* data = nullptr);
};
-typedef uv_handle_ptr_<uv_stream_t> uv_stream_ptr;
-typedef uv_handle_ptr_<uv_handle_t> uv_handle_ptr;
+using uv_stream_ptr = uv_handle_ptr_<uv_stream_t>;
+using uv_handle_ptr = uv_handle_ptr_<uv_handle_t>;
#ifndef cmUVHandlePtr_cxx
diff --git a/Source/cmUuid.cxx b/Source/cmUuid.cxx
index 0dc6ca7f37..91c8af3256 100644
--- a/Source/cmUuid.cxx
+++ b/Source/cmUuid.cxx
@@ -53,7 +53,7 @@ void cmUuid::CreateHashInput(std::vector<unsigned char> const& uuidNamespace,
std::string cmUuid::FromDigest(const unsigned char* digest,
unsigned char version) const
{
- typedef unsigned char byte_t;
+ using byte_t = unsigned char;
byte_t uuid[16] = { 0 };
memcpy(uuid, digest, 16);
diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h
index acac2c1a58..32445d5e44 100644
--- a/Source/cmVariableWatch.h
+++ b/Source/cmVariableWatch.h
@@ -20,10 +20,9 @@ class cmMakefile;
class cmVariableWatch
{
public:
- typedef void (*WatchMethod)(const std::string& variable, int access_type,
- void* client_data, const char* newValue,
- const cmMakefile* mf);
- typedef void (*DeleteData)(void* client_data);
+ using WatchMethod = void (*)(const std::string&, int, void*, const char*,
+ const cmMakefile*);
+ using DeleteData = void (*)(void*);
cmVariableWatch();
~cmVariableWatch();
@@ -77,7 +76,7 @@ protected:
Pair& operator=(const Pair&) = delete;
};
- typedef std::vector<std::shared_ptr<Pair>> VectorOfPairs;
+ using VectorOfPairs = std::vector<std::shared_ptr<Pair>>;
typedef std::map<std::string, VectorOfPairs> StringToVectorOfPairs;
StringToVectorOfPairs WatchMap;
diff --git a/Source/cmWorkerPool.cxx b/Source/cmWorkerPool.cxx
index baf326a264..2e4d00bd31 100644
--- a/Source/cmWorkerPool.cxx
+++ b/Source/cmWorkerPool.cxx
@@ -25,10 +25,10 @@
class cmUVPipeBuffer
{
public:
- typedef cmRange<char const*> DataRange;
- typedef std::function<void(DataRange)> DataFunction;
+ using DataRange = cmRange<const char*>;
+ using DataFunction = std::function<void(DataRange)>;
/// On error the ssize_t argument is a non zero libuv error code
- typedef std::function<void(ssize_t)> EndFunction;
+ using EndFunction = std::function<void(ssize_t)>;
public:
/**
diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h
index d708118fb7..b541ce31b4 100644
--- a/Source/cmWorkerPool.h
+++ b/Source/cmWorkerPool.h
@@ -126,7 +126,7 @@ public:
/**
* Job handle type
*/
- typedef std::unique_ptr<JobT> JobHandleT;
+ using JobHandleT = std::unique_ptr<JobT>;
/**
* Fence job base class
diff --git a/Source/cmXMLParser.h b/Source/cmXMLParser.h
index 98ba04956f..1bc8d64693 100644
--- a/Source/cmXMLParser.h
+++ b/Source/cmXMLParser.h
@@ -42,7 +42,7 @@ public:
virtual int ParseChunk(const char* inputString,
std::string::size_type length);
virtual int CleanupParser();
- typedef void (*ReportFunction)(int, const char*, void*);
+ using ReportFunction = void (*)(int, const char*, void*);
void SetErrorCallback(ReportFunction f, void* d)
{
this->ReportCallback = f;
diff --git a/Source/cmake.h b/Source/cmake.h
index 081e1201bc..cc44b92336 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -503,10 +503,10 @@ protected:
void RunCheckForUnusedVariables();
int HandleDeleteCacheVariables(const std::string& var);
- typedef std::vector<cmGlobalGeneratorFactory*> RegisteredGeneratorsVector;
+ using RegisteredGeneratorsVector = std::vector<cmGlobalGeneratorFactory*>;
RegisteredGeneratorsVector Generators;
- typedef std::vector<cmExternalMakefileProjectGeneratorFactory*>
- RegisteredExtraGeneratorsVector;
+ using RegisteredExtraGeneratorsVector =
+ std::vector<cmExternalMakefileProjectGeneratorFactory*>;
RegisteredExtraGeneratorsVector ExtraGenerators;
void AddScriptingCommands();
void AddProjectCommands();
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 071eec9aba..a79a2ffb96 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -339,8 +339,8 @@ static int HandleCppCheck(const std::string& runCmd,
return ret;
}
-typedef int (*CoCompileHandler)(const std::string&, const std::string&,
- const std::vector<std::string>&);
+using CoCompileHandler = int (*)(const std::string&, const std::string&,
+ const std::vector<std::string>&);
struct CoCompiler
{
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx
index b49803bd6c..b1541e2a00 100644
--- a/Tests/CMakeLib/run_compile_commands.cxx
+++ b/Tests/CMakeLib/run_compile_commands.cxx
@@ -26,7 +26,7 @@ public:
return emptyString;
}
};
- typedef std::vector<CommandType> TranslationUnitsType;
+ using TranslationUnitsType = std::vector<CommandType>;
CompileCommandParser(std::istream& input)
: Input(input)