id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
C++_Classes_Templates/Constexprlikekeyword_44_0.txt
c# has constants, but what exactly are you wanting to accomplish?
C++_Classes_Templates/15079_327_0.txt
**[ iam3yal ](/iam3yal) ** commented Nov 10, 2016 •
C++_Classes_Templates/1157_119_0.txt
Beta Was this translation helpful? Give feedback.
C++_Classes_Templates/1157_159_0.txt
###
C++_Classes_Templates/15079_647_0.txt
Author
C++_Classes_Templates/Constexprlikekeyword_152_0.txt
[ Data structures - the "this" keyword ](//www.codeproject.com/Questions/5359582/Data-structures-the-this-keyword)
C++_Classes_Templates/15079_666_0.txt
Copy link
C++_Classes_Templates/1157_536_0.txt
Italic
C++_Classes_Templates/1157_306_0.txt
Quote reply
C++_Classes_Templates/172624_27_0.txt
![](/img/link.png) Sep 2, 2015 at 1:10pm UTC
C++_Classes_Templates/15079_556_0.txt
I also think and wrote that more types should be supported by ` const ` .
C++_Classes_Templates/C++_Classes_1_5.txt
uctor declaration, a constructor template specialization, constructor template instantiation, or constructor definition) or be used to inherit constructors (since C++11) . struct A { A(); A(int);   template<class T> A(T) {} }; using A_alias = A;   ...
C++_Classes_Templates/1157_470_0.txt
Comment options
C++_Classes_Templates/Constexprlikekeyword_8_0.txt
Sign in with [ ![](/script/Membership/Images/octicons_github-lg.png) ](/script/Membership/OAuthLogOn.aspx?auth=GitHub "Sign in using Github") [ ![](/script/Membership/Images/facebook-lg.png) ](/script/Membership/OAuthLogOn.aspx?auth=Facebook "Sign in using Facebook") [ ![](/script/Membership/Images/google-plus-lg.png) ...
C++_Classes_Templates/1157_531_0.txt
[ ![@GeirGrusom](https://avatars.githubusercontent.com/u/4979268?s=48&v=4) ](/GeirGrusom) [ ![@DavidArno](https://avatars.githubusercontent.com/u/196899?s=48&v=4) ](/DavidArno) [ ![@bondsbw](https://avatars.githubusercontent.com/u/316704?s=48&v=4) ](/bondsbw) [ ![@yaakov-h](https://avatars.githubusercontent.com/u/42600...
C++_Classes_Templates/15079_95_0.txt
---
C++_Classes_Templates/1157_439_0.txt
[ ![](https://avatars.githubusercontent.com/u/3760955?s=64&v=4) ufcpp ](/ufcpp) Dec 2, 2017
C++_Classes_Templates/Constexprlikekeyword_108_0.txt
Swift
C++_Classes_Templates/Constexprlikekeyword_67_0.txt
Share this answer
C++_Classes_Templates/1157_126_0.txt
Quote reply
C++_Classes_Templates/1157_95_0.txt
1 You must be logged in to vote
C++_Classes_Templates/1157_74_0.txt
# {{title}}
C++_Classes_Templates/1157_368_0.txt
Collaborator
C++_Classes_Templates/15079_589_0.txt
Copy link
C++_Classes_Templates/1157_237_0.txt
> An interesting example that came up on roslyn repo is when you're using an > impure type like StringBuilder
C++_Classes_Templates/15079_113_0.txt
edited
C++_Classes_Templates/C++_Classes_8_1.txt
nction") [ Lambda function expression ](/w/cpp/language/lambda "cpp/language/lambda") [ ` inline ` specifier ](/w/cpp/language/inline "cpp/language/inline") [ Dynamic exception specifications ](/w/cpp/language/except_spec "cpp/language/except spec") ( until C++17* ) [ ` noexcept ` specifier ](/w/cpp/language/...
C++_Classes_Templates/15079_281_0.txt
Author
C++_Classes_Templates/1157_2_0.txt
Toggle navigation
C++_Classes_Templates/1157_293_0.txt
###
C++_Classes_Templates/15079_114_0.txt
[ @AdamSpeight2008 ](https://github.com/AdamSpeight2008) What? I'm not sure where you're coming from but this is A DISCUSSION about whether it make sense to have it in C# and if so how you see this fits; if not then why not? THIS ISN'T A PROPOSAL!
C++_Classes_Templates/1157_199_0.txt
Quote reply
C++_Classes_Templates/1157_382_0.txt
Collaborator
C++_Classes_Templates/15079_16_0.txt
* Open Source
C++_Classes_Templates/Constexprlikekeyword_150_0.txt
[ Search the stidents from the inner join script "'incorrect syntax near the keyword 'where'.' ](//www.codeproject.com/Questions/5378710/Search-the- stidents-from-the-inner-join-script-inc)
C++_Classes_Templates/1157_9_0.txt
* Solutions
C++_Classes_Templates/1157_444_0.txt
---
C++_Classes_Templates/15079_592_0.txt
edited
C++_Classes_Templates/1157_524_0.txt
0 replies
C++_Classes_Templates/15079_753_0.txt
Copy link
C++_Classes_Templates/Constexprlikekeyword_142_0.txt
[ ![](https://pubads.g.doubleclick.net/gampad/jump?iu=/6839/lqm.codeproject.site/ros&sz=160x600&c=564061) ](https://pubads.g.doubleclick.net/gampad/jump?iu=/6839/lqm.codeproject.site/ros&sz=160x600&c=564061)
C++_Classes_Templates/1157_364_0.txt
Something went wrong.
C++_Classes_Templates/15079_461_0.txt
---
C++_Classes_Templates/172624_111_0.txt
std::cout << Re << '\n' ;
C++_Classes_Templates/15079_681_0.txt
Besides, I already pointed out that I don't have any objection so I'm not sure what you want me to say... 😄
C++_Classes_Templates/15079_246_0.txt
edited
C++_Classes_Templates/1157_196_0.txt
Comment options
C++_Classes_Templates/15079_483_0.txt
---
C++_Classes_Templates/15079_520_0.txt
---
C++_Classes_Templates/Constexprlikekeyword_121_0.txt
## Preview 0
C++_Classes_Templates/15079_149_0.txt
All reactions
C++_Classes_Templates/15079_714_0.txt
I don't mean that in snarky manner either -- people do those kinds of things simply to find out what happens. Let it happen when it happens, whether it is a genuine error or someone testing boundaries, or an actual use case which hasn't been thought of.
C++_Classes_Templates/Constexprlikekeyword_96_0.txt
ObjectiveC
C++_Classes_Templates/1157_330_0.txt
All reactions
C++_Classes_Templates/15079_273_0.txt
###
C++_Classes_Templates/15079_163_0.txt
###
C++_Classes_Templates/1157_224_0.txt
Beta Was this translation helpful? Give feedback.
C++_Classes_Templates/Constexprlikekeyword_117_0.txt
Strip HTML Encode HTML Paste as-is Code block Quoted Text Best guess
C++_Classes_Templates/15079_139_0.txt
All reactions
C++_Classes_Templates/gcc_bugs_2_1.txt
.cgi?id=fields.html#cf_gccbuild "The machine you are building on. That's the value you passed to ./configure --build.") | x86_64-unknown-linux-gnu [ Known to work: ](page.cgi?id=fields.html#cf_known_to_work "Known versions for which the issue is not reproducible.") | [ Known to fail: ](page.cgi?id=fields.html#cf...
C++_Classes_Templates/1157_173_0.txt
[ ![](https://avatars.githubusercontent.com/u/10102290?s=64&v=4) HaloFour ](/HaloFour) Nov 29, 2017
C++_Classes_Templates/1157_525_0.txt
[ Sign up for free ](/join?source=comment-repo) **to join this conversation on GitHub** . Already have an account? [ Sign in to comment ](/login?return_to=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcsharplang%2Fdiscussions%2F1157)
C++_Classes_Templates/15079_533_0.txt
* 👍 1 reaction
C++_Classes_Templates/172624_76_0.txt
standard_scale generate_scale( const chromatic_scale& cs, const intervals& steps ) { standard_scale result {};
C++_Classes_Templates/Constexprlikekeyword_25_0.txt
Please [ Sign up or sign in ](https://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fQuestions%2f5163309%2fConstexpr- like-keyword-in-Csharp) to vote.
C++_Classes_Templates/Constexprlikekeyword_45_0.txt
[ Benktesh Sharma ](/script/Membership/View.aspx?mid=11073155) 26-Jul-19 17:09pm
C++_Classes_Templates/1157_519_0.txt
I'm sure there are other possible advantages for this - hope it gets picked up.
C++_Classes_Templates/Constexprlikekeyword_81_0.txt
BAT
C++_Classes_Templates/Constexprlikekeyword_64_0.txt
Accept Solution Reject Solution
C++_Classes_Templates/1157_510_0.txt
# {{title}}
C++_Classes_Templates/1157_287_0.txt
0 replies
C++_Classes_Templates/15079_68_0.txt
1. Do you think that something like ` constexpr ` has a place in C#?
C++_Classes_Templates/1157_449_0.txt
Comment options
C++_Classes_Templates/1157_37_0.txt
[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcsharplang%2Fdiscussions%2F1157)
C++_Classes_Templates/172624_16_0.txt
There are a few operations I would be doing frequently such as performing basic modulus operations and ensuring that while iterating through the collection, the iteration would continue past the last element by going back to the first (or going to an element based on some mod operation). Would a vector provide better w...
C++_Classes_Templates/15079_494_0.txt
All reactions
C++_Classes_Templates/15079_581_0.txt
You could extend this to create "pseudo-constants". Basically, you tell the compiler something is a const and cross your fingers. This is "unsafe". In some cases this might be OK and be worthwhile, if your bounding is good.
C++_Classes_Templates/1157_107_0.txt
Beta Was this translation helpful? Give feedback.
C++_Classes_Templates/172624_101_0.txt
It is a function with a special name ` **operator << ** ` It is an overloaded stream insertion operator. [ http://en.cppreference.com/w/cpp/language/operators ](http://en.cppreference.com/w/cpp/language/operators)
C++_Classes_Templates/1157_360_0.txt
All reactions
C++_Classes_Templates/1157_480_0.txt
1 You must be logged in to vote
C++_Classes_Templates/15079_297_0.txt
The by-products when we have support for late binding of const expressions is that it becomes trivial for example to write code for specific architectures (think CpuID), figure out (and exploit) the size of a general T struct type (think T* here), define constants that currently cannot be constants because well, IntPt...
C++_Classes_Templates/1157_299_0.txt
Beta Was this translation helpful? Give feedback.
C++_Classes_Templates/15079_328_0.txt
edited
C++_Classes_Templates/Constexprlikekeyword_20_0.txt
![](https://www.codeproject.com/script/Ratings/Images/star-empty-md.png)
C++_Classes_Templates/1157_73_0.txt
Comment options
C++_Classes_Templates/Constexprlikekeyword_65_0.txt
No, there's nothing like that in C#. There is only a proposal for it: [ Proposal: Compile Time Function Execution · Issue #2379 · dotnet/csharplang · GitHub ](https://github.com/dotnet/csharplang/issues/2379) [ [ ^ ](https://github.com/dotnet/csharplang/issues/2379 "New Window") ] but no implementation as of today.
C++_Classes_Templates/15079_765_0.txt
[ ![@Unknown6656](https://avatars.githubusercontent.com/u/8807985?s=40&u=0b85316fdb479595b2731ec5e1ab0d8c03bb3609&v=4) ](/Unknown6656) [ Unknown6656 ](/Unknown6656) mentioned this issue Jul 15, 2017
C++_Classes_Templates/15079_48_0.txt
[ Sign up for GitHub ](/signup?return_to=%2Fdotnet%2Froslyn%2Fissues%2Fnew%2Fchoose)
C++_Classes_Templates/15079_133_0.txt
Author
C++_Classes_Templates/Constexprlikekeyword_24_0.txt
![](https://www.codeproject.com/script/Ratings/Images/star-empty-md.png)
C++_Classes_Templates/1157_381_0.txt
[ ![](https://avatars.githubusercontent.com/u/4564579?s=64&v=4) CyrusNajmabadi ](/CyrusNajmabadi) Dec 1, 2017
C++_Classes_Templates/15079_594_0.txt
---
C++_Classes_Templates/15079_19_0.txt
Repositories
C++_Classes_Templates/15079_558_0.txt
BTW, this discussion helped me immensely!
C++_Classes_Templates/1157_205_0.txt
Beta Was this translation helpful? Give feedback.
C++_Classes_Templates/15079_192_0.txt
Should everything, which can be computed determinisitcally, be computed during compilation?
C++_Classes_Templates/15079_78_0.txt
All reactions
C++_Classes_Templates/15079_634_0.txt
**[ RandyBuchholz ](/RandyBuchholz) ** commented Jan 30, 2017 •
C++_Classes_Templates/C++_Classes_1_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Flanguage%2Finjected- class-name "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/language/injected-class-name "View the content page \[c\]") * [ Discussion ](/m...