From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Prohibiting dynamic allocation for the given type
Date: Tue, 18 Mar 2008 14:30:37 -0700 (PDT)
Date: 2008-03-18T14:30:37-07:00 [thread overview]
Message-ID: <83335709-e099-416b-9967-5ab6aa0aea11@i12g2000prf.googlegroups.com> (raw)
Is it possible to "prohibit" dynamic allocation for the given type?
Let's suppose that I have a type which instances make sense only on
the stack. I want to prohibit users from dynamically allocating
instances of this type so that they don't get into troubles.
Preferably at compile-time.
My understanding is that it cannot be done (allocation is not
considered to be a type's operation and there is no way to "hide" it
from users - as is possible in C++), but I would like to have it
confirmed.
--
Maciej Sobczak * www.msobczak.com * www.inspirel.com
next reply other threads:[~2008-03-18 21:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 21:30 Maciej Sobczak [this message]
2008-03-19 3:06 ` Prohibiting dynamic allocation for the given type gpriv
2008-03-19 8:24 ` Maciej Sobczak
2008-03-19 11:31 ` Georg Bauhaus
2008-03-19 13:13 ` gpriv
2008-03-19 13:54 ` Maciej Sobczak
2008-03-19 16:37 ` Eric Hughes
2008-03-20 0:48 ` Robert A Duff
2008-03-20 21:35 ` Eric Hughes
2008-03-19 22:17 ` Georg Bauhaus
2008-03-19 23:40 ` gpriv
2008-03-20 21:11 ` Maciej Sobczak
2008-03-19 14:38 ` Adam Beneschan
2008-03-19 15:43 ` gpriv
2008-03-19 14:12 ` Pascal Obry
2008-03-19 23:08 ` Randy Brukardt
2008-03-20 20:26 ` Simon Wright
2008-03-20 22:03 ` Eric Hughes
2008-03-21 1:04 ` Randy Brukardt
2008-03-20 0:43 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox