~ubuntu-branches/ubuntu/quantal/aspectc++/quantal

« back to all changes in this revision

Viewing changes to AspectC++/NamespaceAC.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <sstream>
28
28
using std::ostringstream;
29
29
using std::endl;
30
 
using std::ends;
31
30
 
32
31
 
33
32
string NamespaceAC::def (string size_type) {
37
36
    "\n"
38
37
    "#ifndef __ac_h_\n"
39
38
    "#define __ac_h_\n"
 
39
    "#ifdef __cplusplus\n"
40
40
    "namespace AC {\n"
41
41
    "  typedef const char* Type;\n"
42
42
    "  enum JPType { CALL = 0x0004, EXECUTION = 0x0008, "
52
52
    "    char _data[sizeof (T)];\n"
53
53
    "    ~ResultBuffer () { ((T*)_data)->T::~T(); }\n"
54
54
    "    operator T& () const { return *(T*)_data; }\n"
 
55
    "  };\n"
 
56
    "  template <typename T, typename N> struct TL {\n"
 
57
    "    typedef T type; typedef N next; enum { ARGS = next::ARGS + 1 };\n"
 
58
    "  };\n"
 
59
    "  struct TLE { enum { ARGS = 0 }; };\n"
 
60
    "  template <typename T> struct Referred { typedef T type; };\n"
 
61
    "  template <typename T> struct Referred<T &> { typedef T type; };\n"
 
62
    "  template <typename TL, int I> struct Arg {\n"
 
63
    "    typedef typename Arg<typename TL::next, I - 1>::Type Type;\n"
 
64
    "    typedef typename Referred<Type>::type ReferredType;\n"
 
65
    "  };\n"
 
66
    "  template <typename TL> struct Arg<TL, 0> {\n"
 
67
    "    typedef typename TL::type Type;\n"
 
68
    "    typedef typename Referred<Type>::type ReferredType;\n"
55
69
    "  };\n";
56
70
 
57
71
  // class(es) needed to implement CFlows
73
87
    ", AC::AnyResultBuffer *p) { return p; }\n"
74
88
    "inline void operator delete "
75
89
    "(void *, AC::AnyResultBuffer *) { } // for VC++\n"
 
90
    "#endif // __cplusplus\n"
76
91
    "#endif // __ac_h_\n";
77
92
 
78
93
  return acdef;