Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2004-08-16 10:04:11


David Abrahams wrote:

> I suggest minimizing the example, including the basic_cstring part.
> We can then report the bug to EDG as well as Compaq. EDG may have a
> workaround.

Here it is:

---%<---
template<typename CharT>
class basic_cstring {
   typedef basic_cstring<CharT> self_type;
public:
   typedef CharT value_type;
   typedef value_type* pointer;

   basic_cstring() {}
   basic_cstring( pointer s ) {}

   self_type& operator=( self_type const& s ) {}
};

typedef basic_cstring<char const> const_string;
typedef const_string const literal_string;

void foo(const_string s) { }

int main()
{
   foo(literal_string("foo"));
   return 0;
}
--->%---

Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk