|
Boost : |
From: Bill Klein (bill_at_[hidden])
Date: 2000-12-01 12:29:21
Hmm... The error I got that prompted me to make the config.hpp
change was an error being reported on line 144 of smart_ptr.hpp.
The error was something like "use of 'explicit' not allowed
here"... Very descriptive. :/
I haven't done any personal investigation into what version 6
does and does not support, but I know that at least the lack of
(complete?) support for member templates has meant that other
things haven't worked in the past. For example, I use STLport,
but certain things don't work due to lack of member templates,
such as list::remove_if(). But maybe this is due to a setup
issue?
At 03:22 p.m. 01/12/2000, Jeremy Siek wrote:
>No, Sun 6.0 really does suppose partial spec. and member templates,
>at least my version does ;)
>
>CC: Sun WorkShop 6 2000/04/07 C++ 5.1
>
>Or was there some corner case with member templates that
>didn't work for you?
>
>The Sun people put a lot of work into version 6. It's
>not perfect yet, but it is a BIG improvement over v5.
>
>The following program compiled and executed correctly:
>
>#include <iostream>
>#include <string>
>#include <vector>
>
>class foo {
>public:
> template <class T>
> void bar(T x) { std::cout << x << std::endl; }
>
> template <class T>
> struct yow {
> void bar(T x) { std::cout << x << std::endl; }
> };
>
>};
>
>template <class T>
>class zoo {
>public:
> void ooz() { std::cout << "I'm not special!" << std::endl; }
>};
>
>template <class T>
>class zoo< std::vector<T> >
>{
>public:
> void ooz() { std::cout << "I'm special!" << std::endl; }
>};
>
>int main()
>{
> // check member function templates
> foo f;
> std::string x = "Hello world";
> f.bar(x);
>
> // check member class templates
> foo::yow<std::string> y;
> x = "Hello again";
> y.bar(x);
>
> // check partial specializations
> zoo< std::vector<int> > z;
> z.ooz();
>
> return 0;
>}
>
>
>
>On Fri, 1 Dec 2000, Gregory Seidman wrote:
>
>> Jeremy Siek sez:
>> } I think Sun 6.0 does support partial spec and member template. However,
>> } its headers still #if-out iterator_traits, so that may cause some
>> } problems in places where the wrong boost macro was used.
>>
>> I'm not entirely sure about partial specialization (I think I used it once,
>> but I have been using g++ a lot recently so I may be confused), but it
>> definitely does not support member templates.
>>
>> [...]
>> } Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
>> --Greg
>>
>>
>>
>>
>>
>
>----------------------------------------------------------------------
> Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
> Ph.D. Candidate email: jsiek_at_[hidden]
> Univ. of Notre Dame work phone: (219) 631-3906
>----------------------------------------------------------------------
-Bill Klein <bill_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk