Revision 6542fdbd8d000fc5b18eb3f396b5d18f1ffd6521 authored by Paul Russo on 13 June 2008, 20:34:11 UTC, committed by Paul Russo on 13 June 2008, 20:34:11 UTC
"int" so that NULL translates to a constant integral type. The C++ standard has this to say in section 4.10 Pointer conversions [conv.ptr]: A "null pointer constant" is an integral constant expression (5.19) rvalue of integer type that evaluates to zero. This is a problem in a function overloading situation like this: void f(double); void f(char*); int main() { for (int i = 1; i < 10; ++i) { f(i); } } The rule in section 4.10 on null pointer constants and the rules in Chapter 13 Overloading, make f(char*) a non-viable function for overloading purposes because i is not a "integral constant expression". However given: #define POGO 0 then in the same loop a call written: f(POGO); is ambiguous since both of the functions are viable (because POGO is substituted with 0, which is an integral constant expression). In cint "#define int MyType" is implemented as a variable definition using the special type macroInt$. So we need to make that type const so that overloading works correctly. Note that this is all a gross hack to paper over the fact that cint does not have a proper preprocessor. -- Paul Russo and Philippe Canal git-svn-id: http://root.cern.ch/svn/root/trunk@24273 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 81bd3c4
File | Mode | Size |
---|---|---|
BlackChancery.ttf | -rw-r--r-- | 40.9 KB |
LICENSE | -rw-r--r-- | 4.8 KB |
arial.ttf | -rw-r--r-- | 74.1 KB |
arialbd.ttf | -rw-r--r-- | 75.6 KB |
arialbi.ttf | -rw-r--r-- | 82.0 KB |
ariali.ttf | -rw-r--r-- | 71.5 KB |
ariblk.ttf | -rw-r--r-- | 101.6 KB |
comic.ttf | -rw-r--r-- | 61.6 KB |
comicbd.ttf | -rw-r--r-- | 54.6 KB |
cour.ttf | -rw-r--r-- | 84.0 KB |
courbd.ttf | -rw-r--r-- | 91.9 KB |
courbi.ttf | -rw-r--r-- | 92.2 KB |
couri.ttf | -rw-r--r-- | 89.8 KB |
eve_fontdefault.txf | -rw-r--r-- | 3.1 KB |
eve_fonthelvetica34.txf | -rw-r--r-- | 9.1 KB |
georgia.ttf | -rw-r--r-- | 61.3 KB |
georgiab.ttf | -rw-r--r-- | 58.9 KB |
georgiai.ttf | -rw-r--r-- | 66.6 KB |
georgiaz.ttf | -rw-r--r-- | 67.9 KB |
impact.ttf | -rw-r--r-- | 123.1 KB |
monotype.ttf | -rw-r--r-- | 95.5 KB |
symbol.ttf | -rw-r--r-- | 28.4 KB |
times.ttf | -rw-r--r-- | 92.7 KB |
timesbd.ttf | -rw-r--r-- | 91.7 KB |
timesbi.ttf | -rw-r--r-- | 85.2 KB |
timesi.ttf | -rw-r--r-- | 88.0 KB |
trebuc.ttf | -rw-r--r-- | 56.1 KB |
trebucbd.ttf | -rw-r--r-- | 55.2 KB |
trebucbi.ttf | -rw-r--r-- | 54.5 KB |
trebucit.ttf | -rw-r--r-- | 61.0 KB |
verdana.ttf | -rw-r--r-- | 51.5 KB |
verdanab.ttf | -rw-r--r-- | 52.6 KB |
verdanai.ttf | -rw-r--r-- | 55.7 KB |
verdanaz.ttf | -rw-r--r-- | 58.2 KB |
webdings.ttf | -rw-r--r-- | 110.9 KB |
wingding.ttf | -rw-r--r-- | 69.5 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...