Article View: gnu.g++.help
Article #475conversion
From: Tilo Levante
Date: Thu, 14 Feb 1991 08:23
Date: Thu, 14 Feb 1991 08:23
30 lines
1455 bytes
1455 bytes
Usually a constructor with one parameter is used as conversion operator.
Is it possible to supress this. For example
class prop
{
....
public:
prop();
prop(const gen_op&);
prop(const prop&);
~prop();
....
}
Now each gen_op would be automaticly converted to a prop. I don't want
this, but I need a explicit conversion routine.
Is there a way in C++ to do this.
Thanks.
Tilo
*******************************************************************************
* Tilo Levante Domain: tilo@nmr.lpc.ethz.ch *
* Institut fuer physikalische Chemie UUCP: ...!mcsun!chx400!ethz!tilo *
* Eidgenoessische Technische Hochschule *
* ETH-Zentrum Phone: +41/1/256-4372 *
* CH-8092 Zuerich Fax: +41/1/252-3402 *
*******************************************************************************
Technical Details
Message-ID:
<9102140823.AA16826@purcell.ethz.ch>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!unreplyable!garbage From: tilo@nmr.lpc.ethz.ch (Tilo Levante) Newsgroups: gnu.g++.help,comp.lang.c++ Subject: conversion Message-ID: <9102140823.AA16826@purcell.ethz.ch> Date: 14 Feb 91 08:23:50 GMT Sender: daemon@tut.cis.ohio-state.edu Followup-To: gnu.g++.help Organization: Gatewayed from the GNU Project mailing list help-g++@prep.ai.mit.edu Lines: 30