]> www.ginac.de Git - ginac.git/blobdiff - ginac/utils.h
added check for power::get_free_indices()
[ginac.git] / ginac / utils.h
index e654bf885472028f58682aef9c0c55c1933cbca8..117e84ca7e294a265192765597d288a998c26ee7 100644 (file)
@@ -4,7 +4,7 @@
  *  of any interest to the user of the library. */
 
 /*
- *  GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2004 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
@@ -38,10 +38,12 @@ namespace GiNaC {
 class dunno {};
 
 // some compilers (e.g. cygwin) define a macro log2, causing confusion
-#ifndef log2
-unsigned log2(unsigned n);
+#ifdef log2
+#undef log2
 #endif
 
+unsigned log2(unsigned n);
+
 /** Compare two pointers (just to establish some sort of canonical order).
  *  @return -1, 0, or 1 */
 template <class T>
@@ -438,7 +440,7 @@ extern const ex _ex120;
 // Helper macros for class implementations (mostly useful for trivial classes)
 
 #define DEFAULT_CTOR(classname) \
-classname::classname() : inherited(TINFO_##classname) {}
+classname::classname() : inherited(TINFO_##classname) { setflag(status_flags::evaluated | status_flags::expanded); }
 
 #define DEFAULT_UNARCHIVE(classname) \
 ex classname::unarchive(const archive_node &n, lst &sym_lst) \