stage3/datatype_functions.cc
changeset 447 aad0f3e5df33
parent 445 e6c34ee82954
child 457 67d8b07bac22
equal deleted inserted replaced
446:d871f0eb88fb 447:aad0f3e5df33
   191  * into the candidate_datatype_list of another symbol (to)
   191  * into the candidate_datatype_list of another symbol (to)
   192  */
   192  */
   193 void copy_candidate_datatype_list(symbol_c *from, symbol_c *to) {
   193 void copy_candidate_datatype_list(symbol_c *from, symbol_c *to) {
   194 	if ((NULL == from) || (NULL == to))
   194 	if ((NULL == from) || (NULL == to))
   195 		return;
   195 		return;
   196 	std::copy(from->candidate_datatypes.begin(), from->candidate_datatypes.end(), to->candidate_datatypes.begin());
   196 	for(unsigned int i = 0; i < from->candidate_datatypes.size(); i++)
       
   197 		to->candidate_datatypes.push_back(from->candidate_datatypes[i]);
       
   198 	/* for some reason, the following alternative implementation results in a segmentation fault! I am not going to bother with this for now! */
       
   199 // 	std::copy(from->candidate_datatypes.begin(), from->candidate_datatypes.end(), to->candidate_datatypes.begin());
   197 }
   200 }
   198 
   201 
   199 
   202 
   200 
   203 
   201 
   204