comp.lang.ada
 help / color / mirror / Atom feed
* Prohibiting dynamic allocation for the given type
@ 2008-03-18 21:30 Maciej Sobczak
  2008-03-19  3:06 ` gpriv
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Maciej Sobczak @ 2008-03-18 21:30 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-03-21  1:04 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-18 21:30 Prohibiting dynamic allocation for the given type Maciej Sobczak
2008-03-19  3:06 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox