delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/12/12:45:17

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Markus Werle <numerical DOT simulation AT web DOT de>
Newsgroups: comp.lang.c++,comp.lang.c++.moderated,comp.os.msdos.djgpp
Subject: Re: Heterogenous object container without templates & type casting ???
Followup-To: comp.lang.c++
Date: 12 Feb 2002 12:37:12 -0500
Organization: Aachen University of Technology (RWTH)
Lines: 18
Sender: cppmods AT netlab DOT cs DOT rpi DOT edu
Approved: jep@[151.161.11.6]
Message-ID: <a4albs$qgq$2@nets3.rz.RWTH-Aachen.DE>
References: <a47716$eiq$1 AT tron DOT sci DOT fi>
NNTP-Posting-Host: netlab.cs.rpi.edu
X-Original-Date: Tue, 12 Feb 2002 09:53:33 +0100
X-Submission-Address: c++-submit AT netlab DOT cs DOT rpi DOT edu
X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated
iQBVAwUAPGlSxEHMCo9UcraBAQE0bgH/QbOezYgoJu1PsEpZnS5/FYhlBdJDEQzU
i+PJaRe+xlQO7wiYm2R+82HZCqsuJu0AyMG0UC+dDDulS+Cal21xDw==
=dno/
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Traveler wrote:

> Hi
> 
> Is it possible to transform the following C code to C++ so that there is
> no need for type-casting ?
> I am trying to make a general object class that can contain any type
> without the use of templates.
> 

have You tried boost::any?
http://boost.org/libs/any/index.html


Markus

      [ Send an empty e-mail to c++-help AT netlab DOT cs DOT rpi DOT edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019