------- Comment #2 from mec at google dot com  2006-07-05 22:20 -------
Sure, here is a test program for versa_string:

// Copyright 2006, Google Inc.  All rights reserved.
// Author: [EMAIL PROTECTED]  (Michael Chastain)
//
// Test operator<<(ostream&, const versa_string&)

#include <ext/vstring.h>
#include <iostream>

int main() {
  __gnu_cxx::__versa_string<
    char, std::char_traits<char>, std::allocator<char>
    > s("Hello world");
  std::cout << s << std::endl;
  std::cout.width(60);
  std::cout << s << std::endl;
  std::cout.width(6000);
  std::cout << s << std::endl;
  std::cout.width(60000000);
  std::cout << s << std::endl;
  return 0;
}

This program allocates 60 million bytes on the stack in the last output
statement.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28277

Reply via email to