]> www.ginac.de Git - ginac.git/blobdiff - ginac/ex.cpp
Remove deprecated initialization via overloaded comma operator.
[ginac.git] / ginac / ex.cpp
index 73a3ba79239e7b8b34ba111416110c6b66f8430d..ac31fcc2b11f9062596904269d7b41212f5cfddb 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's light-weight expression handles. */
 
 /*
- *  GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -530,7 +530,25 @@ basic & ex::construct_from_ulong(unsigned long i)
                return dynallocate<numeric>(i);
        }
 }
-       
+
+basic & ex::construct_from_longlong(long long i)
+{
+       if (i >= -12 && i <= 12) {
+               return construct_from_int(static_cast<int>(i));
+       } else {
+               return dynallocate<numeric>(i);
+       }
+}
+
+basic & ex::construct_from_ulonglong(unsigned long long i)
+{
+       if (i <= 12) {
+               return construct_from_uint(static_cast<unsigned>(i));
+       } else {
+               return dynallocate<numeric>(i);
+       }
+}
+
 basic & ex::construct_from_double(double d)
 {
        return dynallocate<numeric>(d);