$(srcdir)/src/util/c99_stdint.h \
$(srcdir)/src/util/forbid_copy.h \
$(srcdir)/src/util/free_list.h \
+ $(srcdir)/src/util/local_increment.h \
$(srcdir)/src/util/range.h \
$(srcdir)/src/util/smart_ptr.h \
$(srcdir)/src/util/substr.h
#include "src/dfa/dfa.h"
#include "src/util/c99_stdint.h"
#include "src/util/forbid_copy.h"
+#include "src/util/local_increment.h"
namespace re2c
{
void append (const Path * p);
};
-template <typename counter_t>
-struct local_increment_t
-{
- counter_t & counter;
- inline explicit local_increment_t (counter_t & c)
- : counter (++c)
- {}
- inline ~local_increment_t ()
- {
- --counter;
- }
-};
-
template <typename container_t>
class wrap_iter_t
{
--- /dev/null
+#ifndef __LOCAL_INCREMENT__
+#define __LOCAL_INCREMENT__
+
+namespace re2c
+{
+
+template <typename counter_t>
+struct local_increment_t
+{
+ counter_t & counter;
+ inline explicit local_increment_t (counter_t & c)
+ : counter (++c)
+ {}
+ inline ~local_increment_t ()
+ {
+ --counter;
+ }
+};
+
+} // namespace re2c
+
+#endif // __LOCAL_INCREMENT__