Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #11779
| From | Qi <no@no.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Any way to detect the absense of virtual destructor in base class? |
| Date | 2011-11-24 21:04 +0800 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <jalfl4$lb4$1@speranza.aioe.org> (permalink) |
| References | <jal28n$gpu$1@speranza.aioe.org> <73c0b260-1a76-4de9-a3ed-e272978d916e@y12g2000vba.googlegroups.com> |
On 2011-11-24 20:50, SG wrote: > Since you said "standard way" and did not explicitly exclude C++2011: > > #include<type_traits> > > ::: > > std::has_virtual_destructor<YourType>::value Thanks This, plus static assert, seems an elegant solution. But, 1, Any equivalence in C++2003 ? 2, If not, any "standard" way to detect the compiler supports only 03 or also supports 11? So I can have some backward compatibility. -- WQ
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Any way to detect the absense of virtual destructor in base class? Qi <no@no.no> - 2011-11-24 17:20 +0800
Re: Any way to detect the absense of virtual destructor in base class? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-24 10:35 +0100
Re: Any way to detect the absense of virtual destructor in base class? Qi <no@no.com> - 2011-11-24 21:05 +0800
Re: Any way to detect the absense of virtual destructor in base class? Juha Nieminen <nospam@thanks.invalid> - 2011-11-25 18:30 +0000
Re: Any way to detect the absense of virtual destructor in base class? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-25 22:25 +0100
Re: Any way to detect the absense of virtual destructor in base class? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-25 22:40 +0100
Re: Any way to detect the absense of virtual destructor in base class? Juha Nieminen <nospam@thanks.invalid> - 2011-11-25 22:30 +0000
Re: Any way to detect the absense of virtual destructor in base class? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2011-11-26 01:36 +0100
Re: Any way to detect the absense of virtual destructor in base class? Juha Nieminen <nospam@thanks.invalid> - 2011-11-26 12:16 +0000
Re: Any way to detect the absense of virtual destructor in base class? Vladimir Jovic <vladaspams@gmail.com> - 2011-11-24 10:45 +0100
Re: Any way to detect the absense of virtual destructor in base class? Qi <no@no.com> - 2011-11-24 21:07 +0800
Re: Any way to detect the absense of virtual destructor in base class? SG <s.gesemann@gmail.com> - 2011-11-24 04:50 -0800
Re: Any way to detect the absense of virtual destructor in base class? Qi <no@no.com> - 2011-11-24 21:04 +0800
Re: Any way to detect the absense of virtual destructor in base class? Marc <marc.glisse@gmail.com> - 2011-11-24 16:12 +0000
Re: Any way to detect the absense of virtual destructor in base class? Lee Steven <steven.mtl@gmail.com> - 2011-11-25 06:55 -0800
Re: Any way to detect the absense of virtual destructor in base class? jgk@panix.com (Joe keane) - 2011-11-25 22:21 +0000
Re: Any way to detect the absense of virtual destructor in base class? Ian Collins <ian-news@hotmail.com> - 2011-11-26 11:32 +1300
csiph-web