id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
C++_Classes_Templates/1157_79_0.txt | At the risk of being a pedant, the other requirement to be a pure method is
that it must not be ` void ` . But, I like the idea of the compiler auto-
annotating methods that meet these requirements and thus avoiding copying
structs when ` readonly ref ` is used. | |
C++_Classes_Templates/15079_612_0.txt | **[ Pzixel ](/Pzixel) ** commented Jan 30, 2017 | |
C++_Classes_Templates/15079_97_0.txt | Sorry, something went wrong. | |
C++_Classes_Templates/15079_760_0.txt | At some point in the future I'll probably create separate issues about _pure
functions_ and _constants types_ but before that I'll do my homework pretty
good. | |
C++_Classes_Templates/1157_458_0.txt | We need the concept of (and I'm sorry, but I can't come up with a better name
for this right now) semi-pure. A semi-pure method is one that does not have
side effects but does mutate one or more of the method's arguments (or, in OO,
the receiver of the instance method). In your example ` .Append( ` is semi-
pure under ... | |
C++_Classes_Templates/1157_434_0.txt | Comment options | |
C++_Classes_Templates/172624_12_0.txt | The personal project I'm working on requires the translation of human readable
music theory to a pure mathematical system, and back to human readable music
theory. | |
C++_Classes_Templates/1157_453_0.txt | ### | |
C++_Classes_Templates/15079_233_0.txt | I think that we should have some kind of compiler hint or switch, like: ` csc
/target:library /out:foobar.dll /max-total-optimization-duration:500ms *.cs `
or a compiler-intrinsic attribue: | |
C++_Classes_Templates/15079_249_0.txt | Why it needs to be sorted? :) | |
C++_Classes_Templates/15079_450_0.txt | [

](/jnm2) | |
C++_Classes_Templates/1157_427_0.txt | [ @GeirGrusom ](https://github.com/GeirGrusom) | |
C++_Classes_Templates/1157_254_0.txt | --- | |
C++_Classes_Templates/1157_543_0.txt | Task list | |
C++_Classes_Templates/15079_307_0.txt | **[ gordanr ](/gordanr) ** commented Nov 10, 2016 | |
C++_Classes_Templates/Constexprlikekeyword_132_0.txt | [ Submit your solution ](javascript:void\(0\)) | |
C++_Classes_Templates/1157_430_0.txt | Beta Was this translation helpful? Give feedback. | |
C++_Classes_Templates/Constexprlikekeyword_26_0.txt | 0.00/5 (No votes) | |
C++_Classes_Templates/1157_139_0.txt | 0 replies | |
C++_Classes_Templates/1157_94_0.txt | Beta Was this translation helpful? Give feedback. | |
C++_Classes_Templates/15079_540_0.txt | edited | |
C++_Classes_Templates/15079_779_0.txt | [ Area-Language Design ](/dotnet/roslyn/labels/Area-Language%20Design) [
Discussion ](/dotnet/roslyn/labels/Discussion) | |
C++_Classes_Templates/gcc_bugs_4_1.txt | ch the issue is not reproducible.") |
[ Known to fail: ](page.cgi?id=fields.html#cf_known_to_fail "Known versions for which the issue is reproducible.") |
[ Last reconfirmed: ](page.cgi?id=fields.html#cf_reconfirmed_on "Last time the issue was confirmed as still being present.") |
* * *
| Attachmen... | |
C++_Classes_Templates/15079_269_0.txt | [ sizeof() of an struct is not treated like a constant like sizeof(int).
#15116 ](/dotnet/roslyn/issues/15116) | |
C++_Classes_Templates/15079_599_0.txt | Author | |
C++_Classes_Templates/C++_Classes_8_3.txt | mber functions ](/w/cpp/language/member_functions "cpp/language/member
functions")
[ Member 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_me... | |
C++_Classes_Templates/15079_180_0.txt | * 👍 2 reactions | |
C++_Classes_Templates/15079_443_0.txt | Author | |
C++_Classes_Templates/15079_175_0.txt | In the example I provided templates are used because C++ doesn't _support_
generics and so in order to support just any type in C++ you must use
templates, in C# you would achieve exactly the same thing with generics. | |
C++_Classes_Templates/C++_Classes_8_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Flanguage%2Fconverting+constructor
"You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/language/converting_constructor "View the content page \[c\]")
* [ Discussion... | |
C++_Classes_Templates/1157_272_0.txt | Beta Was this translation helpful? Give feedback. | |
C++_Classes_Templates/15079_433_0.txt | **[ TonyValenti ](/TonyValenti) ** commented Jan 30, 2017 | |
C++_Classes_Templates/Constexprlikekeyword_89_0.txt | HTML | |
C++_Classes_Templates/15079_554_0.txt | I proposed to add the ` const ` modifier to methods that can be evaluated at
compile-time and have specific rules around it. | |
C++_Classes_Templates/15079_317_0.txt | ### | |
C++_Classes_Templates/1157_404_0.txt | * 👍 2 | |
C++_Classes_Templates/15079_643_0.txt | * 👍 1 reaction | |
C++_Classes_Templates/C++_Classes_4_1.txt | er ](/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/noexcept_spec
"cpp/language/noexcept spec") (C++11)
Exceptions
| [ ` throw ` -expression ](/w/cpp/languag... | |
C++_Classes_Templates/15079_8_0.txt | * [ All features ](https://github.com/features)
* [ Documentation ](https://docs.github.com)
* [ GitHub Skills ](https://skills.github.com)
* [ Blog ](https://github.blog) | |
C++_Classes_Templates/Constexprlikekeyword_43_0.txt | [ ZurdoDev ](/script/Membership/View.aspx?mid=2816533) 26-Jul-19 16:47pm | |
C++_Classes_Templates/Constexprlikekeyword_49_0.txt | int main()
{
static_assert(Fibonacci(5) == 7, "Bad Program");
///...
} | |
C++_Classes_Templates/15079_460_0.txt | You misunderstood; I was making the same point that you were making. It would
be hard if Roslyn had to figure out what functions to exclude, and it would be
useless: therefore, Roslyn should not care what functions you use. | |
C++_Classes_Templates/1157_422_0.txt | # {{title}} | |
C++_Classes_Templates/1157_36_0.txt | Cancel Create saved search | |
C++_Classes_Templates/C++_Classes_3_3.txt | alizer 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 ](/w/cpp/language/friend "cpp/language/friend")
[ ` explicit ` specifier ](/w/cpp/language/explicit "... | |
C++_Classes_Templates/15079_758_0.txt | [ @jramsay ](https://github.com/jramsay) Never mind, I confused _halting_ with
_blocking_ , now some of the things you said make more sense to me. :) | |
C++_Classes_Templates/15079_768_0.txt | 5 tasks | |
C++_Classes_Templates/1157_488_0.txt | [  RedFox20
](/RedFox20) Jan 11, 2018 | |
C++_Classes_Templates/15079_188_0.txt | [ @eyalsk ](https://github.com/eyalsk) | |
C++_Classes_Templates/1157_471_0.txt | # {{title}} | |
C++_Classes_Templates/1157_469_0.txt | 0 replies | |
C++_Classes_Templates/15079_746_0.txt | And if it takes user input to finish, then assume that the programmer knows
that and and has taken steps to provide it. Don't try to second guess what he
wants. Maybe he never intends to compile it on a build server, maybe he has
scripted the system so that "user" input is provided. | |
C++_Classes_Templates/15079_600_0.txt | ### | |
C++_Classes_Templates/1157_154_0.txt | 0 replies | |
C++_Classes_Templates/Constexprlikekeyword_125_0.txt | Download, Vote, Comment, Publish. | |
C++_Classes_Templates/1157_75_0.txt | Something went wrong. | |
C++_Classes_Templates/15079_508_0.txt | --- | |
C++_Classes_Templates/1157_241_0.txt | Beta Was this translation helpful? Give feedback. | |
C++_Classes_Templates/15079_234_0.txt | [CompilerHint(MaxTime = 500, MaxRecursionDepth = 20)]
public const string MY_STRING = /* some incredibly complex constant expression */; | |
C++_Classes_Templates/15079_538_0.txt | ### | |
C++_Classes_Templates/15079_284_0.txt | edited | |
C++_Classes_Templates/1157_110_0.txt | 0 replies | |
C++_Classes_Templates/172624_30_0.txt | Vector are dynamic array . Array is the fastest data structure , in most case. | |
C++_Classes_Templates/15079_236_0.txt | But of course, this is not optimal, because it is not a scalable solution, as
a "timeout" of 500ms might be much to great for a small 11KB-application, but
much to small for a large project like an entire operating system written in
.NET ...... | |
C++_Classes_Templates/Constexprlikekeyword_46_0.txt | in C++, I can have a function (e.g. Fibonacci) like below: | |
C++_Classes_Templates/Constexprlikekeyword_86_0.txt | Dart | |
C++_Classes_Templates/15079_437_0.txt | While I can (and did) build a class that can do all that at run time, if I had
` compile() ` , it would allow me to discover those values at compile time.
The performance boost would be negligible (how long does it really take to
deserialize a 2kb XML file?) but the development experience would be so much
nicer because... | |
C++_Classes_Templates/15079_597_0.txt | [

](/iam3yal) | |
C++_Classes_Templates/1157_516_0.txt | A big plus one on the C++ const method approach - I think this is severely
lacking in C#. I'd only change the keyword to be ` readonly ` to better align
with existing C# keyword usage and meaning. | |
C++_Classes_Templates/Constexprlikekeyword_119_0.txt | --- | |
C++_Classes_Templates/1157_82_0.txt | 1 You must be logged in to vote | |
C++_Classes_Templates/1157_328_0.txt | Beta Was this translation helpful? Give feedback. | |
C++_Classes_Templates/15079_739_0.txt | Copy link | |
C++_Classes_Templates/15079_220_0.txt | 👍 1 Unknown6656 reacted with thumbs up emoji | |
C++_Classes_Templates/15079_386_0.txt | Tony Valenti | |
C++_Classes_Templates/Constexprlikekeyword_138_0.txt | [

](https://pubads.g.doubleclick.net/gampad/jump?iu=/6839/lqm.codeproject.site/ros&sz=300x250&c=564061) | |
C++_Classes_Templates/15079_205_0.txt | ### | |
C++_Classes_Templates/1157_465_0.txt | 1 You must be logged in to vote | |
C++_Classes_Templates/15079_638_0.txt | public class ProcessAttribute : Attribute{
public ProcessAttribute(object route) { | |
C++_Classes_Templates/172624_38_0.txt | After glancing over some material on iterators just now, I'm still not sure
how I could take advantage of them. I have 5 constant arrays at the moment.
The array of size 12 contains all the notes on a piano keyboard represented by
chars for the note's letter name, or in the case of accidentals (black notes),
an 'X' (wh... | |
C++_Classes_Templates/15079_772_0.txt | [

](/Unknown6656) [ Unknown6656 ](/Unknown6656) mentioned this issue Feb 11,
2023 | |
C++_Classes_Templates/1157_352_0.txt | Quote reply | |
C++_Classes_Templates/15079_729_0.txt | ~~I didn't say that it's not fine for a program to halt get blocked if that's
the intention of the programmer so be it but I don't think that a compiler
should halt, let alone getting blocked by a program that it compiles, however,
if a project takes 5 years to compile and that's what it takes then _that's
what it take... | |
C++_Classes_Templates/Constexprlikekeyword_137_0.txt | [ 
](/Questions/5163309/Constexpr-like-keyword-in-Csharp?display=Print) [

](/webservices/QuestionRSS.aspx) | |
C++_Classes_Templates/1157_420_0.txt | 0 replies | |
C++_Classes_Templates/1157_417_0.txt | Beta Was this translation helpful? Give feedback. | |
C++_Classes_Templates/Constexprlikekeyword_90_0.txt | Java | |
C++_Classes_Templates/15079_456_0.txt | [ @asdfgasdfsafgsdfa ](https://github.com/asdfgasdfsafgsdfa) | |
C++_Classes_Templates/15079_177_0.txt | --- | |
C++_Classes_Templates/1157_415_0.txt | It would have been great if C# could warn me about it rather than just
silently voiding mutations. | |
C++_Classes_Templates/15079_160_0.txt | [

](/AdamSpeight2008) | |
C++_Classes_Templates/15079_251_0.txt | > I think that we should have some kind of compiler hint or switch, like: csc
> /target:library /out:foobar.dll /max-total-optimization-duration:500ms *.cs
> or a compiler-intrinsic attribue: | |
C++_Classes_Templates/1157_211_0.txt | Comment options | |
C++_Classes_Templates/15079_465_0.txt | Sorry, something went wrong. | |
C++_Classes_Templates/15079_199_0.txt | All reactions | |
C++_Classes_Templates/1157_541_0.txt | Numbered list | |
C++_Classes_Templates/Constexprlikekeyword_107_0.txt | SQL | |
C++_Classes_Templates/15079_587_0.txt | Sorry, something went wrong. | |
C++_Classes_Templates/1157_12_0.txt | By Solution | |
C++_Classes_Templates/15079_530_0.txt | --- |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.