#line 1 "example2/ah+cc+header/main.cc"
#ifndef __ac_FIRST__home_Tom_aspectcX43X43__
#define __ac_FIRST__home_Tom_aspectcX43X43__
#define __ac_FIRST_FILE__home_Tom_aspectcX43X43_example2_ahX43ccX43header_main_cc__
#ifndef __ac_have_predefined_includes__
#define __ac_have_predefined_includes__
#endif // __ac_have_predefined_includes__

#ifndef __ac_h_
#define __ac_h_
#ifdef __cplusplus
namespace AC {
  typedef const char* Type;
  enum JPType { CALL = 262144, EXECUTION = 16777216, CONSTRUCTION = 33554432, DESTRUCTION = 67108864 };
  enum Protection { PROT_NONE, PROT_PRIVATE, PROT_PROTECTED, PROT_PUBLIC };
  enum Specifiers { SPEC_NONE = 0x0 , SPEC_STATIC = 0x1, SPEC_MUTABLE = 0x2, SPEC_VIRTUAL = 0x4 };
  struct Action {
    void **_args; void *_result; void *_entity; void *_target; void *_that; void *_fptr;
    void (*_wrapper)(Action &);
    inline void trigger () { _wrapper (*this); }
  };
  template <typename T> struct ResultBuffer {
    char _data[sizeof (T)];
    void operator = (const T& t) { *this = (const ResultBuffer &)t; }
  };
  template <typename T, typename N> struct TL {
    typedef T type; typedef N next; enum { ARGS = next::ARGS + 1 };
  };
  struct TLE { enum { ARGS = 0 }; };
  template <typename T> struct Referred { typedef T type; };
  template <typename T> struct Referred<T &> { typedef T type; };
  template <typename TL, int I> struct Arg {
    typedef typename Arg<typename TL::next, I - 1>::Type Type;
    typedef typename Referred<Type>::type ReferredType;
  };
  template <typename TL> struct Arg<TL, 0> {
    typedef typename TL::type Type;
    typedef typename Referred<Type>::type ReferredType;
  };
  template <typename T> int ttest(...);
  template <typename T> char ttest(typename T::__TI const volatile *);
  template<typename T> struct HasTypeInfo {
    enum { RET=((sizeof(ttest<T>(0))==1)?1:0) };
  };
  template<typename T, int HAVE = HasTypeInfo<T>::RET> struct TypeInfo {
    enum { AVAILABLE = 0, BASECLASSES = 0, MEMBERS = 0, FUNCTIONS = 0,
           CONSTRUCTORS = 0, DESTRUCTORS = 0 };
    typedef T That;
  };
  template<typename T> struct TypeInfo<T, 1> : T::__TI {
    enum { AVAILABLE = 1 };
  };
  template<typename T> struct RT {};
  template<typename T> RT<T> rt_deduce (const T&) { return RT<T>(); }
  template<typename T> RT<T> rt_deduce (const volatile T&) { return RT<T>(); }
  struct Cnv { template<typename T> operator RT<T>() const { return RT<T>(); }};
  #define __AC_TYPEOF(expr) (1?AC::Cnv():AC::rt_deduce(expr))
  template <class Aspect, int Index>
  struct CFlow {
    static int &instance () {
      static int counter = 0;
      return counter;
    }
    CFlow () { instance ()++; }
    ~CFlow () { instance ()--; }
    static bool active () { return instance () > 0; }
  };

#ifdef __acdef_float
template <typename BASE, int ID=0> struct _FloatN {
  BASE val;
  _FloatN() {}
  _FloatN(const BASE& v) : val(v) {}
  operator BASE() const { return val; }
};
#endif
}

#ifdef __acdef_float
typedef AC::_FloatN<float> _Float32;
typedef AC::_FloatN<double> _Float32x;
typedef AC::_FloatN<long double, 0> _Float64;
typedef AC::_FloatN<long double, 1> _Float128;
typedef AC::_FloatN<long double, 2> _Float64x;
#endif

#if defined(__acweaving) && defined(__ARM_NEON)
typedef __attribute__ ((__neon_vector_type__ (4))) float __Float32x4_t;
typedef __attribute__ ((__neon_vector_type__ (2))) double __Float64x2_t;
#endif
#endif // __cplusplus
#endif // __ac_h_
class World;
#endif // __ac_FIRST__home_Tom_aspectcX43X43__
// commented out by ac++: #include "hello.h"
#line 1 "example2/ah+cc+header/hello.h"
#line 98 "main.acc"

#ifndef __ac_fwd_World__
#define __ac_fwd_World__
class World;
namespace AC {
  __attribute((always_inline)) inline void invoke_World_World__a0_after ();
}
#endif

#ifndef __ac_need__home_Tom_aspectcX43X43_example2_ahX43ccX43header_world_ah__
#define __ac_need__home_Tom_aspectcX43X43_example2_ahX43ccX43header_world_ah__
#endif

#line 1 "example2/ah+cc+header/hello.h"

#line 1 "example2/ah+cc+header/hello.h"
#ifndef __HELLO_H__
#define __HELLO_H__

#include <iostream>

#line 120 "main.acc"

__attribute__((always_inline)) inline void __exec_old_hello();

#line 6 "example2/ah+cc+header/hello.h"

#line 6 "example2/ah+cc+header/hello.h"
void hello()
#line 128 "main.acc"
{
    ::__exec_old_hello();
  AC::invoke_World_World__a0_after ();
  
}
__attribute__((always_inline)) inline void __exec_old_hello()
#line 6 "example2/ah+cc+header/hello.h"

#line 6 "example2/ah+cc+header/hello.h"
{
  std::cout << "Hello" << std::endl;
}

#endif
#line 95 "example2/ah+cc+header/main.cc"

int main(){
  hello(); //print "Hello"
  return 0;
}
#line 149 "main.acc"

#ifndef __ac_have_predefined_includes__
/*** begin of aspect includes ***/
// commented out by ac++: #include "world.ah"
/*** end of aspect includes ***/
#endif
#line 7 "example2/ah+cc+header/main.cc"

#line 7 "example2/ah+cc+header/main.cc"

#ifdef __ac_FIRST_FILE__home_Tom_aspectcX43X43_example2_ahX43ccX43header_main_cc__
#ifdef __ac_need__home_Tom_aspectcX43X43_example2_ahX43ccX43header_world_ah__
#ifndef __ac_have__home_Tom_aspectcX43X43_example2_ahX43ccX43header_world_ah__
#define __ac_have__home_Tom_aspectcX43X43_example2_ahX43ccX43header_world_ah__
// commented out by ac++: #include "world.ah"
#line 1 "example2/ah+cc+header/world.ah"
#ifndef __WORLD_AH__
#define __WORLD_AH__

// commented out by ac++: #include <iostream>

class World {
#line 172 "main.acc"
public:
  template <typename, int = 0> struct __BYPASSWorld {};
  template <typename, int> friend struct __BYPASSWorld;
private:
#line 6 "example2/ah+cc+header/world.ah"

#line 6 "example2/ah+cc+header/world.ah"


  public: void __a0_after() {
    //print "World" after execution of the 'hello()' function
    std::cout << "World" << std::endl;
  }

#line 187 "main.acc"

public:
  static World *aspectof () {
    static World __instance;
    return &__instance;
  }
  static World *aspectOf () {
    return aspectof ();
  }
private:

#line 13 "example2/ah+cc+header/world.ah"

#line 13 "example2/ah+cc+header/world.ah"
}
#line 203 "main.acc"
;
namespace AC {
  __attribute((always_inline)) inline void invoke_World_World__a0_after () {
    ::World::aspectof()->__a0_after ();
  }
} 

#line 13 "example2/ah+cc+header/world.ah"

#line 13 "example2/ah+cc+header/world.ah"
;

#endif
#line 13 "example2/ah+cc+header/main.cc"
#endif
#endif
#undef __ac_FIRST__home_Tom_aspectcX43X43__
#undef __ac_FIRST_FILE__home_Tom_aspectcX43X43_example2_ahX43ccX43header_main_cc__
#endif // __ac_FIRST_FILE__home_Tom_aspectcX43X43_example2_ahX43ccX43header_main_cc__
