Commit 1cb9879d authored by rmrf's avatar rmrf

Focus on c++14

parent 946da59d
cmake_minimum_required(VERSION 2.6)
project(systemc-clang)
# Use C++ standard version to c++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)
# Always keep it on
set(CMAKE_CXX_STANDARD_REQUIRED ON)
......
......@@ -12,11 +12,13 @@ Model::Model() {
Model::~Model() {
// llvm::errs() << "\n[[ Destructor Model ]]\n";
// Delete all ModuleDecl pointers.
//for (Model::moduleMapType::iterator mit = modules_.begin(); mit != modules_.end(); mit++) {
for (auto const & [it, module_decl] : modules_ ) {
for (Model::moduleMapType::iterator mit = modules_.begin(); mit != modules_.end(); mit++) {
//
// c++17 feature
//for (auto const & [it, module_decl] : modules_ ) {
// Second is the ModuleDecl type.
//delete mit->second;
delete module_decl;
delete mit->second;
//delete module_decl;
}
modules_.clear();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment