]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a overload resolution and partial ordering bug in Intel's
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 May 2001 13:50:49 +0000 (13:50 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 May 2001 13:50:49 +0000 (13:50 +0000)
ICC compiler.

git-svn-id: https://svn.dealii.org/trunk@4651 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/memory_consumption.h
deal.II/base/source/memory_consumption.cc

index 0035ff865817e096018cdf5994f3d070b7e904dd..bc3e780483154d4a06a190af23de4fca6aafb538 100644 (file)
@@ -146,6 +146,20 @@ namespace MemoryConsumption
                                    */
   unsigned int memory_consumption (const std::string &s);
 
+                                  /**
+                                   * Determine an estimate of the
+                                   * amount of memory in bytes
+                                   * consumed by a @p{std::string}
+                                   * variable. This function is there
+                                   * to work around a bug in Intel's
+                                   * ICC compiler which would have
+                                   * taken the general template
+                                   * instead of the above function
+                                   * when presented with a non-const
+                                   * string.
+                                   */
+  unsigned int memory_consumption (std::string &s);
+
                                   /**
                                    * Determine an estimate of the
                                    * amount of memory in bytes
index c33f7c51c8d33b052e48404d88259f04f9994bf3..12931fb2ba3afe0ba8c1c315c2fe4ec9edccdf17 100644 (file)
@@ -24,6 +24,13 @@ namespace MemoryConsumption
 
 
    
+  unsigned int memory_consumption (std::string &s)
+  {
+    return sizeof(s) + s.length();
+  };
+
+
+   
   unsigned int memory_consumption (const std::vector<std::string> &v)
   {
     unsigned int mem = sizeof(v);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.