From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5117b1b6391a0e06 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!nwrdny02.gnilink.net.POSTED!0f19ed38!not-for-mail From: "Frank J. Lhota" Newsgroups: comp.lang.ada References: <_Q%zc.7117$Wr.4869@newsread1.news.pas.earthlink.net> <5ad0dd8a.0406181007.775eae12@posting.google.com> Subject: Re: A simple ADA puzzle (I haven't the answer) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: Date: Fri, 18 Jun 2004 18:37:05 GMT NNTP-Posting-Host: 141.154.58.140 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny02.gnilink.net 1087583825 141.154.58.140 (Fri, 18 Jun 2004 14:37:05 EDT) NNTP-Posting-Date: Fri, 18 Jun 2004 14:37:05 EDT Xref: g2news1.google.com comp.lang.ada:1672 Date: 2004-06-18T18:37:05+00:00 List-Id: "Wojtek Narczynski" wrote in message news:5ad0dd8a.0406181007.775eae12@posting.google.com... > Jeffrey Carter wrote in message news:<_Q%zc.7117$Wr.4869@newsread1.news.pas.earthlink.net>... > Please allow a small quiz: how much memory does an Unbounded_String > instance take, for a string "a" (of lenght 1 char)? The answer depends heavily on how Unbounded_String is implemented, and that will vary from compiler to compiler. However, I think I know what point you're getting at: the Unbounded_String solution has its own storage overhead, and that if the strings involved are all short enough, the Unbounded_String approach may actually use more memory. For similar reasons, there are times where C++ should not use std::string to represent character strings (as useful as std::string is). That is why we need more information about the problem domain before we can determine the best solution to Abby's problem.