]> www.ginac.de Git - cln.git/blobdiff - include/cln/real_class.h
Replace CL_REQUIRE/CL_PROVIDE(cl_I_ring) with portable code.
[cln.git] / include / cln / real_class.h
index 41c0c515ca918a59f02c43985665f0b7bcc964aa..44f25e31df1d96b239bd0348bacaa435da861381 100644 (file)
@@ -22,6 +22,10 @@ public:
        cl_R (const unsigned int);      // argument must be < 2^29
        cl_R (const long);
        cl_R (const unsigned long);
+#ifdef HAVE_LONGLONG
+       cl_R (const long long);
+       cl_R (const unsigned long long);
+#endif
        cl_R (const float);
        cl_R (const double);
        cl_R& operator= (const int);            // |argument| must be < 2^29
@@ -30,13 +34,17 @@ public:
        cl_R& operator= (const unsigned long);
        cl_R& operator= (const float);
        cl_R& operator= (const double);
+#ifdef HAVE_LONGLONG
+       cl_R& operator= (const long long);
+       cl_R& operator= (const unsigned long long);
+#endif
 // Other constructors.
        cl_R (const char *);
 // Private constructor.
        cl_R (cl_private_thing);
 public:        // Ability to place an object at a given address.
        void* operator new (size_t size) { return malloc_hook(size); }
-       void* operator new (size_t size, cl_R* ptr) { (void)size; return ptr; }
+       void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
        void operator delete (void* ptr) { free_hook(ptr); }
 private:
 // Friend declarations. They are for the compiler. Just ignore them.
@@ -56,6 +64,10 @@ CL_DEFINE_INT_CONSTRUCTORS(cl_R)
 CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_R)
 CL_DEFINE_LONG_CONSTRUCTORS(cl_R)
 CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_R)
+#ifdef HAVE_LONGLONG
+CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_R)
+CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_R)
+#endif
 CL_DEFINE_FLOAT_CONSTRUCTOR(cl_R)
 CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_R)