www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: user defined implicit casts

reply Ender KaShae <astrothayne gmail.com> writes:
Tristam MacDonald Wrote:

 It would be nice if this could be generalised to functions, rather than just
operator overloads. Then we could define member functions for specific template
instantiations without having to specialise the whole template, or clog the
body with static ifs.
 

Aug 01 2007
next sibling parent Tristam MacDonald <swiftcoder gmail.com> writes:
The problem being that I can figure otu quite *what* C++ will do in a
specialisation. Sometimes the specialisation will correctly inherit all the
original members and sometimes not, sometimes I can replace members and
sometimes not, so most of the time I must completely re-write the entire
template for each specialisation (as stdc++ does in most cases).

Ender KaShae Wrote:
 Tristam MacDonald Wrote:
 It would be nice if this could be generalised to functions, rather than just
operator overloads. Then we could define member functions for specific template
instantiations without having to specialise the whole template, or clog the
body with static ifs.
 


Aug 01 2007
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Ender KaShae" <astrothayne gmail.com> wrote in message 
news:f8qidi$kq1$1 digitalmars.com...
 Tristam MacDonald Wrote:

 It would be nice if this could be generalised to functions, rather than 
 just operator overloads. Then we could define member functions for 
 specific template instantiations without having to specialise the whole 
 template, or clog the body with static ifs.

c++ does

Ender, Please use a newsreader to read and reply to topics on these newsgroups. There is a bug in the web interface that messes up threading, and it makes all your topics very hard to follow.
Aug 01 2007
parent reply Tristam MacDonald <swiftcoder gmail.com> writes:
The I should probably assume that I am causing the same problems?
(I also use the web interface)

I don't *see* anything wrong with the threading, but I may not know what to
look for.

Jarrett Billingsley Wrote:
 "Ender KaShae" <astrothayne gmail.com> wrote in message 
 news:f8qidi$kq1$1 digitalmars.com...
 Tristam MacDonald Wrote:

 It would be nice if this could be generalised to functions, rather than 
 just operator overloads. Then we could define member functions for 
 specific template instantiations without having to specialise the whole 
 template, or clog the body with static ifs.

c++ does

Ender, Please use a newsreader to read and reply to topics on these newsgroups. There is a bug in the web interface that messes up threading, and it makes all your topics very hard to follow.

Aug 01 2007
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Tristam MacDonald" <swiftcoder gmail.com> wrote in message 
news:f8qn7h$sf7$1 digitalmars.com...
 The I should probably assume that I am causing the same problems?
 (I also use the web interface)

 I don't *see* anything wrong with the threading, but I may not know what 
 to look for.

Sometimes it happens, sometimes it doesn't. Ender's reply to Tristam (this reply) ended up not as a reply to Tristam but as a reply to the OP. Your reply, though, showed up in the right place.
Aug 01 2007