id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
C++_Classes_Templates/Constexprlikekeyword_118_0.txt
To display as
C++_Classes_Templates/C++_Classes_2_2.txt
lias") (C++11) Casts [ Implicit conversions ](/w/cpp/language/implicit_conversion "cpp/language/implicit conversion") \- [ Explicit conversions ](/w/cpp/language/explicit_cast "cpp/language/explicit cast") [ ` static_cast ` ](/w/cpp/language/static_cast "cpp/language/static cast") \- [ ` dynamic_cast ` ](/w/cpp/l...
C++_Classes_Templates/15079_735_0.txt
[ ![@Unknown6656](https://avatars.githubusercontent.com/u/8807985?s=40&u=0b85316fdb479595b2731ec5e1ab0d8c03bb3609&v=4) ](/Unknown6656) [ Unknown6656 ](/Unknown6656) mentioned this issue Feb 3, 2017
C++_Classes_Templates/1157_179_0.txt
👍 1
C++_Classes_Templates/1157_271_0.txt
---
C++_Classes_Templates/15079_217_0.txt
> Where do we draw the line between constant expressions, which should be pre- > computed by the compiler and expression, which should be evaluated at > runtime?
C++_Classes_Templates/15079_568_0.txt
If I define a set of conditions where under those conditions y=F(x) will always evaluate to the same value for y, y becomes indistinguishable from a const (within that scope), and should be able to be treated as a const by the compiler. (or more simply, by intellisense, and confirmed by the compiler)
C++_Classes_Templates/1157_141_0.txt
# {{title}}
C++_Classes_Templates/1157_129_0.txt
I feel like pure should be a language construct and not an attribute, the compiler, beyond optimization, should throw an error when it tries to access a field, IO or some other global state, finally, pure functions cannot call non- pure functions.
C++_Classes_Templates/15079_591_0.txt
**[ RandyBuchholz ](/RandyBuchholz) ** commented Jan 30, 2017 •
C++_Classes_Templates/172624_116_0.txt
Last edited on Sep 3, 2015 at 4:54pm UTC
C++_Classes_Templates/1157_96_0.txt
All reactions
C++_Classes_Templates/Constexprlikekeyword_98_0.txt
PERL
C++_Classes_Templates/1157_308_0.txt
[ ![](https://avatars.githubusercontent.com/u/9973420?s=64&v=4) mikedn ](/mikedn) Nov 30, 2017
C++_Classes_Templates/15079_786_0.txt
18 participants
C++_Classes_Templates/15079_641_0.txt
👍 1 iam3yal reacted with thumbs up emoji
C++_Classes_Templates/15079_402_0.txt
Copy link
C++_Classes_Templates/15079_411_0.txt
1. Completely sure that entity is constant. 2. Completely sure that entity is not constant. 3. Can't decide. 4. Can't decide. Entity too complex. Analysis aborted after 20ms. 5. ...
C++_Classes_Templates/15079_119_0.txt
---
C++_Classes_Templates/1157_63_0.txt
* Tons of code has been written without it, but all they would have to do is recompile to get it.
C++_Classes_Templates/172624_91_0.txt
std::ostream& operator<< ( std::ostream& stm, note n ) { static const char* const name_of[] { "A", "AS_BF", "B", "C", "CS_BF", "D", "DS_EF", "E", "F", "FS_GF", "G", "GS_AF" } ; return stm << name_of[n] ; }
C++_Classes_Templates/15079_595_0.txt
All reactions
C++_Classes_Templates/1157_178_0.txt
1 You must be logged in to vote
C++_Classes_Templates/1157_244_0.txt
0 replies
C++_Classes_Templates/15079_771_0.txt
Closed
C++_Classes_Templates/1157_334_0.txt
Something went wrong.
C++_Classes_Templates/Constexprlikekeyword_114_0.txt
` var ` < > & link [^] encode untab case indent outdent
C++_Classes_Templates/15079_458_0.txt
>> The hard part would be if Roslyn had to figure out what functions to exclude, thereby making Console.ReadLine a compile error.
C++_Classes_Templates/15079_521_0.txt
All reactions
C++_Classes_Templates/15079_644_0.txt
Sorry, something went wrong.
C++_Classes_Templates/Constexprlikekeyword_120_0.txt
Treat my content as plain text, not as HTML
C++_Classes_Templates/15079_265_0.txt
---
C++_Classes_Templates/15079_190_0.txt
Oh, perfect! Then I have two things:
C++_Classes_Templates/15079_717_0.txt
All reactions
C++_Classes_Templates/15079_756_0.txt
**[ iam3yal ](/iam3yal) ** commented Feb 11, 2017 •
C++_Classes_Templates/15079_785_0.txt
No branches or pull requests
C++_Classes_Templates/15079_72_0.txt
At first when I wrote this post I had thoughts about allowing ` Math ` to be evaluated at compile-time when feasible, I already proposed to add the power operator ** into the language and I thought that if we would have something like ` constexpr ` in C# we could write these _operators_ ourselves.
C++_Classes_Templates/C++_Classes_1_4.txt
e/elaborated_type_specifier "cpp/language/elaborated type specifier") of a friend class template declaration. Otherwise, it is treated as a type-name, and is equivalent to the template- name followed by the template-parameters of the class template enclosed in ` ** <> ** ` . template<template<class, cl...
C++_Classes_Templates/172624_92_0.txt
---|---
C++_Classes_Templates/15079_454_0.txt
**[ jnm2 ](/jnm2) ** commented Jan 30, 2017 •
C++_Classes_Templates/1157_43_0.txt
* [ Code ](/dotnet/csharplang) * [ Issues 441 ](/dotnet/csharplang/issues) * [ Pull requests 40 ](/dotnet/csharplang/pulls) * [ Discussions ](/dotnet/csharplang/discussions) * [ Projects 4 ](/dotnet/csharplang/projects) * [ Security ](/dotnet/csharplang/security) * [ Insights ](/dotnet/csharplang/pulse)
C++_Classes_Templates/15079_509_0.txt
All reactions
C++_Classes_Templates/172624_75_0.txt
// 2: tone interval, 1:semitone interval constexpr intervals major_scale_intervals { { 2, 2, 1, 2, 2, 2 } } ;
C++_Classes_Templates/1157_343_0.txt
I'll leave it at that, since further discussion should probably be moved to the ` constexpr ` issue ( [ #504 ](https://github.com/dotnet/csharplang/discussions/504) )
C++_Classes_Templates/Constexprlikekeyword_101_0.txt
Python
C++_Classes_Templates/1157_549_0.txt
* Heading * Bold * Italic * Quote * Code * Link * * Numbered list * Unordered list * Task list * * Attach files * Mention * Reference
C++_Classes_Templates/15079_713_0.txt
[ @eyalsk ](https://github.com/eyalsk) : Halting Problem (capital H, capital P), not halting problem. And what is the functional difference between a program that terminates in 5 years vs one that hangs and never terminates? Because if you are executing my code, and allow loops, I guarantee that I can make it exectue f...
C++_Classes_Templates/C++_Classes_4_2.txt
as "cpp/language/type alias") (C++11) Casts [ Implicit conversions ](/w/cpp/language/implicit_conversion "cpp/language/implicit conversion") \- [ Explicit conversions ](/w/cpp/language/explicit_cast "cpp/language/explicit cast") [ ` static_cast ` ](/w/cpp/language/static_cast "cpp/language/static cast") \- [ ` dy...
C++_Classes_Templates/1157_355_0.txt
> The rules of how the IL gets executed are fairly explicit and shouldn't have > inputs/outputs differing between runtimes or hosts.
C++_Classes_Templates/1157_413_0.txt
I err'ed with this today.
C++_Classes_Templates/1157_111_0.txt
Comment options
C++_Classes_Templates/15079_324_0.txt
Copy link
C++_Classes_Templates/15079_493_0.txt
---
C++_Classes_Templates/15079_506_0.txt
You could say that about simpler examples as well, right? I mean what would be the advantage of having Pow(2,3) or fib(...) calculated at compiletime? And wouldn't the answer to those questions not apply to more complex things as well? Geniously curious where you'd draw the line and why.
C++_Classes_Templates/1157_286_0.txt
All reactions
C++_Classes_Templates/15079_247_0.txt
[ @Unknown6656 ](https://github.com/Unknown6656)
C++_Classes_Templates/15079_75_0.txt
---
C++_Classes_Templates/Constexprlikekeyword_143_0.txt
Related Questions
C++_Classes_Templates/15079_406_0.txt
[ @eyalsk ](https://github.com/eyalsk) I think that analogy with mark variables with const, you mentioned earlier, is bad. We must mark variable with const to ensure variable not to be changed. There is no proof that we must mark "constexpr" to function if we want to get value at compile time. Possibly that can mark co...
C++_Classes_Templates/15079_609_0.txt
[ ![@Pzixel](https://avatars.githubusercontent.com/u/11201122?s=80&u=b167b53f65d631417db340758e82197e6984d4c8&v=4) ](/Pzixel)
C++_Classes_Templates/172624_79_0.txt
standard_scale major_scale( note key ) { return generate_scale( keyed_chromatic_scale(key), major_scale_intervals ) ; }
C++_Classes_Templates/15079_138_0.txt
🎉 1 AdamSpeight2008 reacted with hooray emoji
C++_Classes_Templates/Constexprlikekeyword_115_0.txt
---
C++_Classes_Templates/15079_306_0.txt
###
C++_Classes_Templates/15079_727_0.txt
Sorry missed the fact that it's a term.
C++_Classes_Templates/15079_260_0.txt
[ @eyalsk ](https://github.com/eyalsk)
C++_Classes_Templates/15079_624_0.txt
[ @RandyBuchholz ](https://github.com/RandyBuchholz)
C++_Classes_Templates/15079_422_0.txt
[ @CyrusNajmabadi ](https://github.com/CyrusNajmabadi) Many of these things can be achieved with code generators the only important issue is how code generators is going to be integrated into the language? if it's through attributes then it's obviously impose some limitations as I pointed out above, if someone on the l...
C++_Classes_Templates/1157_331_0.txt
0 replies
C++_Classes_Templates/Constexprlikekeyword_4_0.txt
Email
C++_Classes_Templates/15079_80_0.txt
[ ![@Unknown6656](https://avatars.githubusercontent.com/u/8807985?s=80&u=0b85316fdb479595b2731ec5e1ab0d8c03bb3609&v=4) ](/Unknown6656)
C++_Classes_Templates/1157_4_0.txt
[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcsharplang%2Fdiscussions%2F1157)
C++_Classes_Templates/15079_764_0.txt
[ ![@iam3yal](https://avatars.githubusercontent.com/u/3756641?s=40&u=b853037d90aa1b20e6864477d91be927aeed062c&v=4) ](/iam3yal) [ iam3yal ](/iam3yal) closed this as [ completed ](/dotnet/roslyn/issues?q=is%3Aissue+is%3Aclosed+archived%3Afalse+reason%3Acompleted) Feb 11, 2017
C++_Classes_Templates/15079_711_0.txt
###
C++_Classes_Templates/1157_93_0.txt
---
C++_Classes_Templates/15079_627_0.txt
👍 1 deinok reacted with thumbs up emoji
C++_Classes_Templates/15079_698_0.txt
Author
C++_Classes_Templates/15079_449_0.txt
Sorry, something went wrong.
C++_Classes_Templates/1157_440_0.txt
If this proposal were championed, ` in ` extension method could be allowed?
C++_Classes_Templates/1157_452_0.txt
Quote reply
C++_Classes_Templates/15079_789_0.txt
[ ](https://github.com "GitHub") © 2024 GitHub, Inc.
C++_Classes_Templates/15079_616_0.txt
[ @TonyValenti ](https://github.com/TonyValenti)
C++_Classes_Templates/15079_362_0.txt
* 👍 1 reaction
C++_Classes_Templates/15079_654_0.txt
All reactions
C++_Classes_Templates/172624_114_0.txt
---|---
C++_Classes_Templates/15079_631_0.txt
[ ![@RandyBuchholz](https://avatars.githubusercontent.com/u/13967891?s=80&v=4) ](/RandyBuchholz)
C++_Classes_Templates/15079_710_0.txt
Contributor
C++_Classes_Templates/15079_127_0.txt
[ @eyalsk ](https://github.com/eyalsk) You've misunderstood what I said. I'm say if people are asking for something like _constexpr_ . We should ask why, and if we need to do something.
C++_Classes_Templates/1157_10_0.txt
For
C++_Classes_Templates/15079_572_0.txt
public enum Foo { One, Two }; public enum Bar { One, Two };
C++_Classes_Templates/172624_9_0.txt
![](/img/link.png) Sep 2, 2015 at 1:38am UTC
C++_Classes_Templates/1157_486_0.txt
Quote reply
C++_Classes_Templates/C++_Classes_1_3.txt
r access specifiers ](/w/cpp/language/access "cpp/language/access") [ Constructors and member initializer lists ](/w/cpp/language/constructor "cpp/language/constructor") [ Default member initializer ](/w/cpp/language/data_members#Member_initialization "cpp/language/data members") (C++11) [ ` friend ` specifier ](...
C++_Classes_Templates/15079_32_0.txt
## Use saved searches to filter your results more quickly
C++_Classes_Templates/15079_7_0.txt
Explore
C++_Classes_Templates/15079_447_0.txt
---
C++_Classes_Templates/15079_4_0.txt
[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fdotnet%2Froslyn%2Fissues%2F15079)
C++_Classes_Templates/1157_52_0.txt
Return to top
C++_Classes_Templates/15079_25_0.txt
Clear
C++_Classes_Templates/1157_503_0.txt
Beta Was this translation helpful? Give feedback.