https://github.com/root-project/root
Raw File
Tip revision: 2cd3aafb76e161c5e687de877863ffeb4022b4b0 authored by Gerardo Ganis on 11 June 2012, 16:52:22 UTC
Import patch r44048 removing the automatic creation of TDrawFeedback in TProofChain
Tip revision: 2cd3aaf
t1079.cxx
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (cint@pcroot.cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/

#include <cstdio>

#if defined(interp) && defined(makecint)
#pragma include "test.dll"
#else
#include "t1079.h"
#endif

using namespace std;

template<class T> 
void f(T& x) {
  smart_ptr<T> p(&x);
  std::printf("%s\n",p->c_str());
}

int main() {
  std::string x("stringx");
  f(x);
  String y("Stringy");
  f(y);
  return 0;
}
back to top