Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <e905ea62-5a56-4eb6-82c0-96ed02f00660@googlegroups.com> (permalink) |
|---|---|
| Newsgroups | comp.std.c++ |
| From | s.scott.schurr@googlemail.com |
| Subject | Re: Where in the C++11 standard does it specify when a constexpr function can be evaluated during translation? |
| Organization | unknown |
| References | <6dab6ab0-c0e6-4261-8f1e-7e42c0c7a427@googlegroups.com> <kag0lf$pi9$1@dont-email.me> |
| Date | 2012-12-18 16:06 -0600 |
On Saturday, December 15, 2012 10:54:25 AM UTC-8, Daniel Krügler wrote: > Am 14.12.2012 18:15, schrieb sschurr: > > The heart of the question is this: > > > > <quote> > > > > I've been looking through the C++11 FDIS (N3242, available > > at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/) > > to try and determine two things: > > > > o When is the compiler obligated to evaluate a constexpr > > function during translation? > > > > o When is the compiler allowed to evaluate a constexpr > > function during translation? > > > > [...snip...] > > Answers to these questions are related to the context, in which a > constexpr function is used. I would like to warn you that the standard > itself is not a document that is written to answer such questions > directly. If you want to enumerate these cases, you have to read through > all the standard and have to find those places that impose such a > requirement. This is extremely hard work and I'm not willing to do that > at the moment ;-) But if you are willing to accept some general > conclusions this can lead to still useful rules of the thumb. [snip a lot of very useful information] Wow. I'd like to express my thanks to Mr. Krügler for his extremely detailed and useful response. I know that well thought out answers, like Mr. Krügler's, take a lot of time to compose. It's great to have someone from inside the C++ standards community take the time to help innocents (like me) come up to speed. Please accept my thanks and gratitude. SSchurr -- [ 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 | Find similar
Where in the C++11 standard does it specify when a constexpr function can be evaluated during translation? sschurr<s.scott.schurr@googlemail.com> - 2012-12-14 09:15 -0800
Re: Where in the C++11 standard does it specify when a constexpr function can be evaluated during translation? Daniel Krügler <daniel.kruegler@googlemail.com> - 2012-12-15 10:54 -0800
Re: Where in the C++11 standard does it specify when a constexpr function can be evaluated during translation? s.scott.schurr@googlemail.com - 2012-12-18 16:06 -0600
csiph-web