https://github.com/root-project/root
Raw File
Tip revision: a70b5a421674eba71862352aa7296d9ddc4ba9ba authored by Pere Mato on 05 April 2016, 08:24:40 UTC
Update ROOT version files to v5.34/36.
Tip revision: a70b5a4
t777.cxx
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (root-cint@cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/

// -- file const.C
//#include "iostream.h"
#include <stdio.h>

class MyClass4 {};

const MyClass4* g(const MyClass4* arg ) {
  printf("with const\n");
  //cout << "with const MyClass4*" << endl;
  return arg;
}

MyClass4* g(MyClass4* arg  ) {
  printf("without const\n");
  //cout << "with MyClass4*" << endl;
  return arg;
}

void run() {
  g( (const MyClass4*)0 );
  g( (MyClass4*)0 );

}

int main() {
  run();
  return 0;
}
back to top