+// set this to '0' if you want to have really safe types
+#if 1
+
+ /// a type for sizes
+ typedef std::vector<char>::size_type size_type;
+
+ /// a type used for numbering text classes
+ // used to be LyXTextClassList::size_type
+ typedef std::vector<char>::size_type textclass_type;
+
+#else
+
+ // These structs wrap simple things to make them distinguishible
+ // to the compiler.
+ // It's a shame that different typedefs are not "really" different
+
+ struct size_type {
+ ///
+ typedef std::vector<char>::size_type base_type;
+ ///
+ size_type(base_type t) { data_ = t; }
+ ///
+ operator base_type() const { return data_; }
+ ///
+ private:
+ base_type data_;
+ };
+
+ struct textclass_type {
+ ///
+ typedef std::vector<char>::size_type base_type;
+ ///
+ textclass_type(base_type t) { data_ = t; }
+ ///
+ operator base_type() const { return data_; }
+ ///
+ private:
+ base_type data_;
+ };
+