--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/int-to-type.h Fri Sep 28 10:32:59 2007 +0200
@@ -0,0 +1,19 @@
+#ifndef INT_TO_TYPE_H
+#define INT_TO_TYPE_H
+
+namespace ns3 {
+
+/**
+ * This trivial template is extremely useful, as explained in
+ * "Modern C++ Design", p29, section 2.4,
+ * "Mapping Integral Constants to Types"
+ */
+template <int v>
+struct IntToType
+{
+ enum {value = v};
+};
+
+} // namespace ns3
+
+#endif /* INT_TO_TYPE_H */
--- a/src/core/wscript Fri Sep 28 10:32:15 2007 +0200
+++ b/src/core/wscript Fri Sep 28 10:32:59 2007 +0200
@@ -95,5 +95,6 @@
'composite-trace-resolver.h',
'array-trace-resolver.h',
'trace-doc.h',
+ 'int-to-type.h',
]