RE:CINT STL: vector<double>::push_back(int)

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Mon Oct 04 1999 - 22:56:20 MEST


Hi Christian,

I post this answer to roottalk.

This is a bug already fixed but not activated because of shared lib
compatibility.  The problem happens in following situation.

  void f(const double& x); // precompiled function
  main() {
    f(1); // integer literal argument
  }

This is fixed in cint5.14.15, however, at cost of shared library
incompatibility. So the change is deactivated at this moment. To
activate the fix, define G__REVCONV  either in platform dependency
file or G__ci.h file.

The incompatibility situation is as follows which is not so bad.

 1) Shared libs made by 5.14.14 or earier can be linked with
   any version of root/cint.
 2) Shared libs made by 5.14.15 or later without G__REFCONV can
   be linked with any version of root/cint.
 3) Shared libs made by 5.14.15 or later with G__REFCONV can
   only be linked with root/cint5.14.15 or later. 
 4) root/cint5.14.15 or later can link any version of shared libs 
   regardless of G__REFCONV. 

So, in general, it is a good thing to switch to cint5.14.15 or later.

Thank you
Masaharu Goto

>
>hi, is this a bug?
>
>cdfsg5$ root.exe
>root> #include <vector.h>
>root> vector<double> v;
>root> v.push_back(1)
>root> v.push_back(2)
>root> v.push_back(3.0)
>root> int i;
>root> for(i=0;i<3;i++) cout << v[i] << endl;
>2.122e-314
>4.24399e-314
>3
>root> 
>
>---
>  *   Version   2.22/10     7 August 1999   *
>FreeType Engine v1.1 used to render TrueType fonts.
>CINT/ROOT C/C++ Interpreter version 5.14.10, Jul 20 1999
>set automatic variable allocation mode '0'
>



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:40 MET