Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #6093
| From | Pete Becker <pete@versatilecoding.com> |
|---|---|
| Organization | Roundhouse Consulting, Ltd. |
| Newsgroups | comp.lang.c++ |
| Date | 2011-06-02 10:21 -1000 |
| Message-ID | <2011060210211182589-pete@versatilecodingcom> (permalink) |
| References | <4de78326$0$6554$9b4e6d93@newsspool4.arcor-online.net> <4de7ee37$0$7626$9b4e6d93@newsspool1.arcor-online.net> |
| Subject | Re: Casting template argument |
On 2011-06-02 10:10:30 -1000, Marcel Müller said: > > Well, the application is platform dependent for other, functional > reasons anyway. The reinterpret cast from const data* to const char* is > AFAIK no UB. But this does not automatically apply to casting the > function pointer to a function with another argument type. On my target > platform it makes no difference. All pointers arguments except for > member function pointers are treated in the same way. So what is UB in > general is not necessarily UB on this specific platform. > Undefined behavior arises from valid code constructs for which the C++ language definition does not impose any requirements. That doesn't depend in any way on the compiler that you're using or on the target platform. The *consequences* of using code whose behavior is undefined depend on the compiler and the platform. -- Pete Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The Standard C++ Library Extensions: a Tutorial and Reference (www.petebecker.com/tr1book)
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Casting template argument Marcel Müller <news.5.maazl@spamgourmet.org> - 2011-06-02 14:33 +0200
Re: Casting template argument Victor Bazarov <v.bazarov@comcast.invalid> - 2011-06-02 10:17 -0400
Re: Casting template argument Marcel Müller <news.5.maazl@spamgourmet.org> - 2011-06-02 22:10 +0200
Re: Casting template argument Pete Becker <pete@versatilecoding.com> - 2011-06-02 10:21 -1000
Re: Casting template argument Marcel Müller <news.5.maazl@spamgourmet.org> - 2011-06-02 22:34 +0200
Re: Casting template argument Pete Becker <pete@versatilecoding.com> - 2011-06-02 10:40 -1000
csiph-web