diff -Nuar freehdl-0.0.8.orig/fire/test-fire.cc freehdl-0.0.8/fire/test-fire.cc --- freehdl-0.0.8.orig/fire/test-fire.cc 2006-02-16 10:56:22.000000000 +0200 +++ freehdl-0.0.8/fire/test-fire.cc 2020-03-30 02:54:42.423609306 +0300 @@ -2,7 +2,7 @@ #include #include -using namespace std; +using std::cout; extern tree_chunk_info fire_chunk_info; diff -Nuar freehdl-0.0.8.orig/freehdl/cdfggen-chunk.h freehdl-0.0.8/freehdl/cdfggen-chunk.h --- freehdl-0.0.8.orig/freehdl/cdfggen-chunk.h 2009-04-27 19:31:00.000000000 +0300 +++ freehdl-0.0.8/freehdl/cdfggen-chunk.h 2020-03-30 02:54:42.423609306 +0300 @@ -7,7 +7,9 @@ #include #include typedef enum {to, downto} cdfgg_direction; -using namespace std; +using std::string; +using std::vector; +using std::pair; extern tree_chunk_info cdfggen_chunk_info; extern tree_ctype_info int_ctype_info; diff -Nuar freehdl-0.0.8.orig/freehdl/cdfggen-chunk.t freehdl-0.0.8/freehdl/cdfggen-chunk.t --- freehdl-0.0.8.orig/freehdl/cdfggen-chunk.t 2003-04-09 19:40:56.000000000 +0300 +++ freehdl-0.0.8/freehdl/cdfggen-chunk.t 2020-03-30 02:54:42.423609306 +0300 @@ -13,8 +13,7 @@ (header-add "#include " "#include " "#include " - "typedef enum {to, downto} cdfgg_direction;" - "using namespace std;") + "typedef enum {to, downto} cdfgg_direction;") (impl-add "#include ") diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-attributes.hh freehdl-0.0.8/freehdl/kernel-attributes.hh --- freehdl-0.0.8.orig/freehdl/kernel-attributes.hh 2004-11-09 20:29:33.000000000 +0200 +++ freehdl-0.0.8/freehdl/kernel-attributes.hh 2020-03-30 02:54:42.423609306 +0300 @@ -1,6 +1,8 @@ #ifndef FREEHDL_KERNEL_ATTRIBUTES_H #define FREEHDL_KERNEL_ATTRIBUTES_H +using std::max; + /* ************************************************************* * Function kind attributes for signals * ************************************************************* */ diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-db.hh freehdl-0.0.8/freehdl/kernel-db.hh --- freehdl-0.0.8.orig/freehdl/kernel-db.hh 2009-03-15 19:51:51.000000000 +0200 +++ freehdl-0.0.8/freehdl/kernel-db.hh 2020-04-22 20:56:59.646330605 +0300 @@ -3,6 +3,11 @@ #include +#include +#include +using std::string; +using std::pair; +using std::vector; /* This header file includes the definitions that are required to * setup a kernel database. This database will be used by the kernel @@ -39,6 +44,11 @@ define_db_entry_type(driver_data, driver_data_entry) +#include +#include +using std::string; +using std::pair; +using std::vector; // Now, create an database explorer instance. The database explorer is // used to search and manipulate the database. The explorer is @@ -80,9 +90,11 @@ #include #if !defined __GNUC__ || __GNUC__ != 2 -#include +//#include +#include #else -#include +//#include +#include #endif // Macro used to define a key type. K is the actual type of the key @@ -254,10 +266,10 @@ // A hash function template used tp generate a hash number from // d -class db_basic_key_hash : public hash { +class db_basic_key_hash : public std::hash { public: size_t operator()(const db_basic_key& x) const { - return (*(hash *)this)(((unsigned long)x.value)>>2); + return (*(std::hash *)this)(((unsigned long)x.value)>>2); } }; @@ -266,7 +278,8 @@ class db : public db_base { // This mappes is the actual database. - typedef hash_map db_data_map_type; + //typedef hash_map db_data_map_type; + typedef std::unordered_map db_data_map_type; db_data_map_type data_map; // The transaction id is incremented each time a new key is added or diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-dump.hh freehdl-0.0.8/freehdl/kernel-dump.hh --- freehdl-0.0.8.orig/freehdl/kernel-dump.hh 2003-04-10 18:11:23.000000000 +0300 +++ freehdl-0.0.8/freehdl/kernel-dump.hh 2020-03-30 02:54:42.439609671 +0300 @@ -13,9 +13,9 @@ #include #include -using namespace std; +using std::fstream; -typedef map > Tmap; +typedef map > Tmap; extern Tmap mapping_translation_table; // For each signal which is dumped an virtual process is created. This diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-fhdl-stream.hh freehdl-0.0.8/freehdl/kernel-fhdl-stream.hh --- freehdl-0.0.8.orig/freehdl/kernel-fhdl-stream.hh 2005-02-15 12:02:31.000000000 +0200 +++ freehdl-0.0.8/freehdl/kernel-fhdl-stream.hh 2020-03-30 02:54:42.439609671 +0300 @@ -9,7 +9,9 @@ #include #include -using namespace std; +using std::istream; +using std::ostream; +using std::string; struct fhdl_ostream_t { union { diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-map-list.hh freehdl-0.0.8/freehdl/kernel-map-list.hh --- freehdl-0.0.8.orig/freehdl/kernel-map-list.hh 2003-07-08 15:17:35.000000000 +0300 +++ freehdl-0.0.8/freehdl/kernel-map-list.hh 2020-03-30 02:54:42.439609671 +0300 @@ -7,7 +7,6 @@ #include #include -using namespace std; //using namespace __gnu_cxx; // A signal_link instance describes the connection @@ -163,9 +162,11 @@ #include #if !defined __GNUC__ || __GNUC__ != 2 -#include +//#include +#include #else -#include +//#include +#include #endif #include @@ -262,7 +263,7 @@ }; -typedef hash_map, pointer_hash > port_signal_link_map_t; +typedef std::unordered_map, pointer_hash > port_signal_link_map_t; // Stores the father signal(s) of port signals extern port_signal_link_map_t port_signal_link_map; diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-name-stack.hh freehdl-0.0.8/freehdl/kernel-name-stack.hh --- freehdl-0.0.8.orig/freehdl/kernel-name-stack.hh 2003-04-09 19:10:06.000000000 +0300 +++ freehdl-0.0.8/freehdl/kernel-name-stack.hh 2020-03-30 02:54:42.439609671 +0300 @@ -3,7 +3,7 @@ #include -using namespace std; +using std::string; #define NAME_STACK_INCREMENT 10 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-signal-source-list-array.hh freehdl-0.0.8/freehdl/kernel-signal-source-list-array.hh --- freehdl-0.0.8.orig/freehdl/kernel-signal-source-list-array.hh 2006-02-16 10:56:22.000000000 +0200 +++ freehdl-0.0.8/freehdl/kernel-signal-source-list-array.hh 2020-03-30 02:54:42.439609671 +0300 @@ -4,16 +4,17 @@ #ifdef KERNEL #if !defined __GNUC__ || __GNUC__ != 2 -#include +//#include +#include #else -#include +//#include +#include #endif #include #include #include -using namespace std; //using namespace __gnu_cxx; // signal_source stores information about a source of a signal. Note @@ -105,7 +106,7 @@ // a map stores the sources for each signal. Note that each signal is // associated with a vector of signal_source_list pointers (included // in signal_source_list_array). -typedef hash_map > signal_source_map_t; +typedef std::unordered_map > signal_source_map_t; extern signal_source_map_t signal_source_map; #endif diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-util.hh freehdl-0.0.8/freehdl/kernel-util.hh --- freehdl-0.0.8.orig/freehdl/kernel-util.hh 2008-02-15 20:30:07.000000000 +0200 +++ freehdl-0.0.8/freehdl/kernel-util.hh 2020-04-22 20:36:48.558615436 +0300 @@ -10,24 +10,28 @@ #include #if !defined __GNUC__ || __GNUC__ != 2 -#include +//#include +#include #else -#include +//#include +#include #endif -using namespace std; +using std::stringstream; +using std::string; + #if !defined __GNUC__ || __GNUC__ != 2 -using namespace __gnu_cxx; +//using namespace __gnu_cxx; #endif // A hash function template used tp generate a hash number from // pointer values. template -class pointer_hash : public hash { +class pointer_hash : public std::hash { public: size_t operator()(const T& x) const { - return (*(hash *)this)(((unsigned long)x)>>2); + return (*(std::hash *)this)(((unsigned long)x)>>2); } }; diff -Nuar freehdl-0.0.8.orig/freehdl/std.h freehdl-0.0.8/freehdl/std.h --- freehdl-0.0.8.orig/freehdl/std.h 2003-04-09 19:10:06.000000000 +0300 +++ freehdl-0.0.8/freehdl/std.h 2020-03-30 02:54:42.439609671 +0300 @@ -1,7 +1,6 @@ #ifndef FREEHDL_STD_H #define FREEHDL_STD_H -using namespace std; #include #include diff -Nuar freehdl-0.0.8.orig/freehdl/std-vhdl-types.hh freehdl-0.0.8/freehdl/std-vhdl-types.hh --- freehdl-0.0.8.orig/freehdl/std-vhdl-types.hh 2008-02-15 18:31:41.000000000 +0200 +++ freehdl-0.0.8/freehdl/std-vhdl-types.hh 2020-03-30 02:54:42.443609762 +0300 @@ -6,13 +6,24 @@ #include #include #include +#include +#include +#include #include #include #include #include -using namespace std; +using std::string; +using std::istream; +using std::ostream; +using std::min; +using std::map; +using std::stringstream; +using std::list; +using std::less; +using std::iostream; typedef long long int lint; const int BUFFER_STREAM_SIZE_INCREMENT = 1024; diff -Nuar freehdl-0.0.8.orig/freehdl/vaul-lexer.h freehdl-0.0.8/freehdl/vaul-lexer.h --- freehdl-0.0.8.orig/freehdl/vaul-lexer.h 2009-04-21 22:37:36.000000000 +0300 +++ freehdl-0.0.8/freehdl/vaul-lexer.h 2020-03-30 02:54:42.443609762 +0300 @@ -32,7 +32,6 @@ #include #include -using namespace std; #undef yyFlexLexer #define yyFlexLexer vaul_FlexLexer diff -Nuar freehdl-0.0.8.orig/kernel/attributes.cc freehdl-0.0.8/kernel/attributes.cc --- freehdl-0.0.8.orig/kernel/attributes.cc 2004-11-09 20:29:33.000000000 +0200 +++ freehdl-0.0.8/kernel/attributes.cc 2020-03-30 02:54:42.443609762 +0300 @@ -5,6 +5,7 @@ #include #include #include +using std::max; #include diff -Nuar freehdl-0.0.8.orig/kernel/db.cc freehdl-0.0.8/kernel/db.cc --- freehdl-0.0.8.orig/kernel/db.cc 2005-05-04 17:44:11.000000000 +0300 +++ freehdl-0.0.8/kernel/db.cc 2020-03-30 02:54:42.447609853 +0300 @@ -1,6 +1,5 @@ #define KERNEL // Include internal kernel definitions -using namespace std; #include diff -Nuar freehdl-0.0.8.orig/kernel/fhdl_stream.cc freehdl-0.0.8/kernel/fhdl_stream.cc --- freehdl-0.0.8.orig/kernel/fhdl_stream.cc 2006-01-12 10:05:01.000000000 +0200 +++ freehdl-0.0.8/kernel/fhdl_stream.cc 2020-03-30 02:54:42.447609853 +0300 @@ -7,6 +7,9 @@ #include #include +using std::cin; +using std::cout; +using std::stringstream; // Error stream to output error messages generated by the kernel, // e.g. to print error messages due to invalid simulator commands diff -Nuar freehdl-0.0.8.orig/kernel/kernel_class.cc freehdl-0.0.8/kernel/kernel_class.cc --- freehdl-0.0.8.orig/kernel/kernel_class.cc 2009-10-11 19:34:19.000000000 +0300 +++ freehdl-0.0.8/kernel/kernel_class.cc 2020-03-30 02:54:42.447609853 +0300 @@ -15,6 +15,15 @@ #include #include #include +#include + +using std::cerr; +using std::pair; +using std::binary_function; + +using std::cerr; +using std::pair; +using std::binary_function; // Arguments that are passed in form the command line int main_argc; @@ -678,7 +687,7 @@ // list associated with the various reader infos. Identical lists // are replaced by appropriate pointers to a single list in order to // save memory. - typedef hash_multimap wait_elements_map_t; + typedef std::unordered_multimap wait_elements_map_t; wait_elements_map_t wait_elements_map; // Setup connection to the kernel data base diff -Nuar freehdl-0.0.8.orig/kernel/main.cc freehdl-0.0.8/kernel/main.cc --- freehdl-0.0.8.orig/kernel/main.cc 2009-03-15 20:48:13.000000000 +0200 +++ freehdl-0.0.8/kernel/main.cc 2020-03-30 02:54:42.447609853 +0300 @@ -34,6 +34,15 @@ #include #include +using std::ios; +using std::ifstream; +using std::ofstream; +using std::ostringstream; +using std::cin; +using std::cerr; +using std::cout; +using std::endl; + #ifdef PERFMON_STATISTICS #include "pcounter.hh" #endif diff -Nuar freehdl-0.0.8.orig/kernel/map_list.cc freehdl-0.0.8/kernel/map_list.cc --- freehdl-0.0.8.orig/kernel/map_list.cc 2006-02-16 10:56:22.000000000 +0200 +++ freehdl-0.0.8/kernel/map_list.cc 2020-03-30 02:54:42.447609853 +0300 @@ -3,6 +3,12 @@ #include #include #include +#include + + +using std::max; + +using std::max; // Stores the father signal(s) of port signals port_signal_link_map_t port_signal_link_map; diff -Nuar freehdl-0.0.8.orig/kernel/name_stack.cc freehdl-0.0.8/kernel/name_stack.cc --- freehdl-0.0.8.orig/kernel/name_stack.cc 2000-09-20 11:41:14.000000000 +0300 +++ freehdl-0.0.8/kernel/name_stack.cc 2020-03-30 02:54:42.447609853 +0300 @@ -1,8 +1,10 @@ #include #include +#include #include #include +using std::stack; name_stack instance_name; diff -Nuar freehdl-0.0.8.orig/kernel/persistent_cdfg_dump.cc freehdl-0.0.8/kernel/persistent_cdfg_dump.cc --- freehdl-0.0.8.orig/kernel/persistent_cdfg_dump.cc 2006-02-16 10:56:22.000000000 +0200 +++ freehdl-0.0.8/kernel/persistent_cdfg_dump.cc 2020-03-30 02:54:42.447609853 +0300 @@ -3,6 +3,7 @@ #include #include +using std::endl; buffer_stream register_cdfg_tmp_buffer; diff -Nuar freehdl-0.0.8.orig/kernel/sig_info.cc freehdl-0.0.8/kernel/sig_info.cc --- freehdl-0.0.8.orig/kernel/sig_info.cc 2009-03-15 20:23:09.000000000 +0200 +++ freehdl-0.0.8/kernel/sig_info.cc 2020-03-30 02:54:42.451609945 +0300 @@ -1,6 +1,5 @@ #define KERNEL // Include internal kernel definitions -using namespace std; #include #include #include diff -Nuar freehdl-0.0.8.orig/std/internal_textio.cc freehdl-0.0.8/std/internal_textio.cc --- freehdl-0.0.8.orig/std/internal_textio.cc 2006-01-26 09:41:24.000000000 +0200 +++ freehdl-0.0.8/std/internal_textio.cc 2020-03-30 02:54:42.451609945 +0300 @@ -10,6 +10,10 @@ #include #include +using std::ios; +using std::cin; +using std::cout; + /* package :std:textio */ /* Definitions for access type :std:textio:line */ diff -Nuar freehdl-0.0.8.orig/std/vhdl_types.cc freehdl-0.0.8/std/vhdl_types.cc --- freehdl-0.0.8.orig/std/vhdl_types.cc 2009-03-15 20:56:57.000000000 +0200 +++ freehdl-0.0.8/std/vhdl_types.cc 2020-03-30 02:54:42.451609945 +0300 @@ -12,6 +12,9 @@ #include +using std::ios; +using std::ifstream; +using std::ofstream; /* ************************************************************* * Some global functions diff -Nuar freehdl-0.0.8.orig/v2cc/mapping.cc freehdl-0.0.8/v2cc/mapping.cc --- freehdl-0.0.8.orig/v2cc/mapping.cc 2008-02-15 20:11:15.000000000 +0200 +++ freehdl-0.0.8/v2cc/mapping.cc 2020-03-30 02:54:42.451609945 +0300 @@ -34,7 +34,12 @@ #include #include -using namespace std; +using std::string; +using std::list; +using std::map; +using std::istream; +using std::ifstream; +using std::cerr; v2cc_mapper::v2cc_mapper () { diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc.cc freehdl-0.0.8/v2cc/v2cc.cc --- freehdl-0.0.8.orig/v2cc/v2cc.cc 2010-04-13 22:43:30.000000000 +0300 +++ freehdl-0.0.8/v2cc/v2cc.cc 2020-03-30 02:54:42.451609945 +0300 @@ -35,7 +35,6 @@ */ -using namespace std; #if HAVE_MALLOC_H #include diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-const-fold.cc freehdl-0.0.8/v2cc/v2cc-const-fold.cc --- freehdl-0.0.8.orig/v2cc/v2cc-const-fold.cc 2008-02-15 20:13:19.000000000 +0200 +++ freehdl-0.0.8/v2cc/v2cc-const-fold.cc 2020-03-30 02:54:42.451609945 +0300 @@ -16,6 +16,9 @@ #include "v2cc-util.h" +using std::cerr; +using std::max; +using std::min; // Used to generate error messages extern vaul_error_printer codegen_error; diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-decl.cc freehdl-0.0.8/v2cc/v2cc-decl.cc --- freehdl-0.0.8.orig/v2cc/v2cc-decl.cc 2010-05-08 15:15:38.000000000 +0300 +++ freehdl-0.0.8/v2cc/v2cc-decl.cc 2020-03-30 02:54:42.451609945 +0300 @@ -13,6 +13,9 @@ #include "mapping.h" #include "v2cc-util.h" +using std::endl; +using std::min; +using std::max; void test (RegionStack &rstack) { diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-explore.cc freehdl-0.0.8/v2cc/v2cc-explore.cc --- freehdl-0.0.8.orig/v2cc/v2cc-explore.cc 2010-04-12 21:40:40.000000000 +0300 +++ freehdl-0.0.8/v2cc/v2cc-explore.cc 2020-03-30 02:54:42.455610036 +0300 @@ -15,7 +15,6 @@ #include "mapping.h" #include "v2cc-util.h" -using namespace std; // Used to generate error messages extern vaul_error_printer codegen_error; diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc.h freehdl-0.0.8/v2cc/v2cc.h --- freehdl-0.0.8.orig/v2cc/v2cc.h 2006-03-17 11:22:55.000000000 +0200 +++ freehdl-0.0.8/v2cc/v2cc.h 2020-03-30 02:54:42.463610219 +0300 @@ -1,7 +1,17 @@ #ifndef V2CC_HEADER #define V2CC_HEADER -using namespace std; +using std::vector; +using std::list; +using std::string; +using std::pair; +using std::string; +using std::set; +using std::less; +using std::deque; +using std::binary_function; +using std::map; +using std::binary_function; #include #include "mapping.h" diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-qid.cc freehdl-0.0.8/v2cc/v2cc-qid.cc --- freehdl-0.0.8.orig/v2cc/v2cc-qid.cc 2006-02-16 10:56:22.000000000 +0200 +++ freehdl-0.0.8/v2cc/v2cc-qid.cc 2020-03-30 02:54:42.463610219 +0300 @@ -4,6 +4,7 @@ #include "v2cc-util.h" +using std::endl; // ****************************************************************************************** // Name: m_qid , generic function diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-util.cc freehdl-0.0.8/v2cc/v2cc-util.cc --- freehdl-0.0.8.orig/v2cc/v2cc-util.cc 2009-04-19 01:51:38.000000000 +0300 +++ freehdl-0.0.8/v2cc/v2cc-util.cc 2020-03-30 02:54:42.463610219 +0300 @@ -9,6 +9,9 @@ #include "v2cc-util.h" +using std::endl; +using std::hex; +using std::dec; // ****************************************************************************************** // Some global variables diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-util.h freehdl-0.0.8/v2cc/v2cc-util.h --- freehdl-0.0.8.orig/v2cc/v2cc-util.h 2007-10-23 23:13:29.000000000 +0300 +++ freehdl-0.0.8/v2cc/v2cc-util.h 2020-03-30 02:55:06.160150752 +0300 @@ -2,12 +2,19 @@ #ifndef V2CC_UTIL_H #define V2CC_UTIL_H -using namespace std; #include #include #include #include "v2cc-chunk.h" +#include + +using std::stringstream; +using std::setprecision; +using std::showpoint; +using std::ofstream; +using std::cout; +using std::to_string; // ****************************************************************************************** // Some global variables @@ -242,7 +249,8 @@ /* Convert an integer value into a string */ template -inline string +//inline string +inline typename std::enable_if::value, std::string>::type to_string(T i) { stringstream lstr; @@ -250,6 +258,8 @@ return lstr.str(); } + +/* inline string to_string(double i) { @@ -266,6 +276,7 @@ return str + ".0"; #endif } +*/ /* Print scalar value into a string */ string diff -Nuar freehdl-0.0.8.orig/vaul/bison-parser.cc freehdl-0.0.8/vaul/bison-parser.cc --- freehdl-0.0.8.orig/vaul/bison-parser.cc 2009-10-11 19:24:48.000000000 +0300 +++ freehdl-0.0.8/vaul/bison-parser.cc 2020-03-30 02:54:42.467610310 +0300 @@ -86,7 +86,6 @@ #include #endif -using namespace std; #define YYINITDEPTH 10000 #define YYMAXDEPTH 100000 diff -Nuar freehdl-0.0.8.orig/vaul/bison-parser.yy freehdl-0.0.8/vaul/bison-parser.yy --- freehdl-0.0.8.orig/vaul/bison-parser.yy 2006-02-16 10:56:23.000000000 +0200 +++ freehdl-0.0.8/vaul/bison-parser.yy 2020-03-30 02:54:42.471610401 +0300 @@ -49,7 +49,6 @@ #include #endif -using namespace std; #define YYINITDEPTH 10000 #define YYMAXDEPTH 100000 diff -Nuar freehdl-0.0.8.orig/vaul/printer.cc freehdl-0.0.8/vaul/printer.cc --- freehdl-0.0.8.orig/vaul/printer.cc 2007-10-23 23:52:52.000000000 +0300 +++ freehdl-0.0.8/vaul/printer.cc 2020-03-30 02:54:42.471610401 +0300 @@ -27,7 +27,8 @@ #include #include -using namespace std; +using std::ostringstream; +using std::ostream; void vaul_printer::printf (const char *fmt, ...) { diff -Nuar freehdl-0.0.8.orig/vaul/tree.cc freehdl-0.0.8/vaul/tree.cc --- freehdl-0.0.8.orig/vaul/tree.cc 2005-02-28 19:40:13.000000000 +0200 +++ freehdl-0.0.8/vaul/tree.cc 2020-03-30 02:54:42.471610401 +0300 @@ -31,7 +31,7 @@ #include #include -using namespace std; +using std::ostream; vaul_id_set::vaul_id_set(int dummy) {