tags 625156 + patch
thanks

attached a patch that fixes the issue.
some missing #include <cstddef> and moving a few template functions from
a .cpp to a .h.
The patch was *not* forwarded upstream, but it should be done, the
latter patch results from a misunderstanding of how templates work.
--- mcrl2-201103.orig/libraries/lts/include/mcrl2/lts/detail/sim_hashtable.h
+++ mcrl2-201103/libraries/lts/include/mcrl2/lts/detail/sim_hashtable.h
@@ -22,6 +22,7 @@
 #ifndef SIM_HASHTABLE_H
 #define SIM_HASHTABLE_H
 #include <vector>
+#include <cstddef>
 
 struct bucket2
 {
--- mcrl2-201103.orig/libraries/lts/include/mcrl2/lts/detail/tree_set.h
+++ mcrl2-201103/libraries/lts/include/mcrl2/lts/detail/tree_set.h
@@ -11,6 +11,7 @@
 #ifndef _TREE_SET_H
 #define _TREE_SET_H
 #include <vector>
+#include <cstddef>
 
 namespace mcrl2
 {
--- mcrl2-201103.orig/tools/lysa2mcrl2/lysa.cpp
+++ mcrl2-201103/tools/lysa2mcrl2/lysa.cpp
@@ -51,52 +51,6 @@ void ProcessInfo::override_calculus(Calc
   _calculus = c;
 }
 
-template< typename T>   string join_ptr(T& input, string sep)
-{
-  string s = "";
-  typename T::iterator it=input.begin();
-  typename T::iterator it_end=input.end();
-
-  if (it==it_end)
-  {
-    return s;
-  }
-  //write first element
-  s += (string)(**it);
-  it++;
-
-  //write other elements
-
-  for (; it!=it_end; it++)
-  {
-    s += sep + (string)(**it);
-  }
-  return s;
-}
-template< typename T>   string join(T& input, string sep)
-{
-  string s = "";
-  typename T::iterator it=input.begin();
-  typename T::iterator it_end=input.end();
-
-  if (it==it_end)
-  {
-    return s;
-  }
-  //write first element
-  s += (string)(*it);
-  it++;
-
-  //write other elements
-
-  for (; it!=it_end; it++)
-  {
-    s += sep + (string)(*it);
-  }
-  return s;
-}
-//template string join(Indices& input, string sep);
-
 
 string Expression::position_in_input()
 {
--- mcrl2-201103.orig/tools/lysa2mcrl2/lysa.h
+++ mcrl2-201103/tools/lysa2mcrl2/lysa.h
@@ -105,8 +105,52 @@ class ProcessInfo
 extern shared_ptr<ProcessInfo> current_process_info;
 void start_parsing(lysa_options& options);
 void set_current_position(parse_location& pos);
-template<typename T> string join(T& input, string sep);
-template<typename T> string join_ptr(T& input, string sep);
+
+template< typename T>   string join_ptr(T& input, string sep)
+{
+  string s = "";
+  typename T::iterator it=input.begin();
+  typename T::iterator it_end=input.end();
+
+  if (it==it_end)
+  {
+    return s;
+  }
+  //write first element
+  s += (string)(**it);
+  it++;
+
+  //write other elements
+
+  for (; it!=it_end; it++)
+  {
+    s += sep + (string)(**it);
+  }
+  return s;
+}
+template< typename T>   string join(T& input, string sep)
+{
+  string s = "";
+  typename T::iterator it=input.begin();
+  typename T::iterator it_end=input.end();
+
+  if (it==it_end)
+  {
+    return s;
+  }
+  //write first element
+  s += (string)(*it);
+  it++;
+
+  //write other elements
+
+  for (; it!=it_end; it++)
+  {
+    s += sep + (string)(*it);
+  }
+  return s;
+}
+//template string join(Indices& input, string sep);
 
 
 class Expression
--- mcrl2-201103.orig/tools/ltsview/state.cpp
+++ mcrl2-201103/tools/ltsview/state.cpp
@@ -10,6 +10,7 @@
 
 #include "state.h"
 #include "transition.h"
+#include <cstddef>
 
 using namespace std;
 
--- mcrl2-201103.orig/tools/ltsview/transition.cpp
+++ mcrl2-201103/tools/ltsview/transition.cpp
@@ -13,6 +13,7 @@
 
 #include "transition.h"
 #include "state.h"
+#include <cstddef>
 
 // Constructor and Destructor
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to