Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Thu, 07 Feb 2013 02:40:01 -0600 |
| Return-Path | <cppmods@mcgurn.dreamhost.com> |
| Sender | std-cpp-request@vandevoorde.com |
| Approved | james.dennett@gmail.com |
| Message-ID | <511287F1.7040107@verizon.net> (permalink) |
| Newsgroups | comp.std.c++ |
| From | James Kuyper <jameskuyper@verizon.net> |
| Subject | Re: detecting incomplete type |
| Organization | A noiseless patient Spider |
| References | <kepfmi$gfm$1@news.ett.com.ua> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Original-Date | Wed, 06 Feb 2013 11:42:25 -0500 |
| X-Submission-Address | std-cpp-submit@vandevoorde.com |
| To | undisclosed-recipients:; |
| Date | Thu, 7 Feb 2013 02:31:59 CST |
| Lines | 29 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-qElMoGUf6pvrwjtXssEhYte7lNfu7Zd5C4jqhEvfVrO5uWaHjJzCZo4L6PQIg+mMjxhisHAwEDAz4gD!EOOHYZ1NdLAQO5E+9MFdeVQc5m7sjQ4eLPp0MJcm2I7wWezBIUksWA== |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2403 |
| Xref | csiph.com comp.std.c++:589 |
Show key headers only | View raw
On 02/06/2013 02:50 AM, Balog Pal wrote: > > What is a standard way to tell whether a type is complete or not? In a > way usable in say static_assert? It's trivial to determine at compile time whether a type is complete by writing code for which a diagnostic is required if the type is incomplete. However, it sounds like you want a method that can be used in program that compiles and executes successfully. I don't know of any standard way to do that. ... > So what to do then? I looked through type_traits for no help. A few of the type_traits don't require that the type they are instantiated for be complete (all of the ones in table 48, plus is_const, is_volatile, is_signed, and is_unsigned), but offhand I can't come up with any construct that has standard-defined behavior for an incomplete type which is different from that required if the type had been complete. -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
detecting incomplete type Balog Pal <pasa@lib.hu> - 2013-02-06 01:50 -0600 Re: detecting incomplete type Daniel Krügler <daniel.kruegler@googlemail.com> - 2013-02-07 02:08 -0600 Re: detecting incomplete type James Kuyper <jameskuyper@verizon.net> - 2013-02-07 02:31 -0600 Re: detecting incomplete type James Kanze <james.kanze@googlemail.com> - 2013-02-07 02:32 -0600
csiph-web