} \
}
}
+
+#define DEFINE_OWNING_POINTER_COPY_FUNCTIONS(A) \
+ DEFINE_OWNING_POINTER_COPY_CONSTRUCTORS(A) \
+ DEFINE_OWNING_POINTER_COPY_ASSIGNMENTS(A)
+#define DEFINE_OWNING_POINTER_SPECIAL_FUNCTIONS(A) \
+ DEFINE_OWNING_POINTER_DESTRUCTOR(A) \
+ DEFINE_OWNING_POINTER_COPY_FUNCTIONS(A)
+
#endif // FORTRAN_COMMON_INDIRECTION_H_
}
// Define OwningPointer special member functions
-DEFINE_OWNING_POINTER_DESTRUCTOR(evaluate::characteristics::Procedure)
-DEFINE_OWNING_POINTER_COPY_CONSTRUCTORS(evaluate::characteristics::Procedure)
-DEFINE_OWNING_POINTER_COPY_ASSIGNMENTS(evaluate::characteristics::Procedure)
+DEFINE_OWNING_POINTER_SPECIAL_FUNCTIONS(evaluate::characteristics::Procedure)
#include <variant>
#include <vector>
-// Forward declare Procedure so dummy procedures can use it indirectly
namespace Fortran::evaluate::characteristics {
-struct Procedure;
-}
-namespace Fortran::common {
-extern template class OwningPointer<evaluate::characteristics::Procedure>;
-}
-namespace Fortran::evaluate::characteristics {
+// Forward declare Procedure so dummy procedures can use it indirectly
+struct Procedure;
// 15.3.2.2
struct DummyDataObject {
// been embedded in the parse tree. This destructor appears here, where
// definitions for all the necessary types are available, to obviate a
// need to include lib/evaluate/*.h headers in the parser proper.
-DEFINE_OWNING_POINTER_DESTRUCTOR(evaluate::GenericExprWrapper)
+DEFINE_OWNING_POINTER_SPECIAL_FUNCTIONS(evaluate::GenericExprWrapper)
};
// This wrapper class is used, by means of a forward reference with
-// OwningPointer, to implement owning pointers to analyzed expressions
+// OwningPointer , to implement owning pointers to analyzed expressions
// from parse tree nodes.
struct GenericExprWrapper {
GenericExprWrapper(Expr<SomeType> &&x) : v{std::move(x)} {}