id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
C++_Classes_Templates/15079_702_0.txt
It's not really strange definition because it is not the same field, Computer Science and Mathematics are two different fields and the GCC designers can call it however they want but anyway I'll call them ` pure ` functions from now on and stick to with it.
C++_Classes_Templates/1157_515_0.txt
Collaborator
C++_Classes_Templates/15079_390_0.txt
* 👍 3 reactions * ❤️ 1 reaction
C++_Classes_Templates/1157_554_0.txt
[ ](https://github.com "GitHub") © 2024 GitHub, Inc.
C++_Classes_Templates/172624_10_0.txt
[ **BustTheCode** (10) ](/user/BustTheCode/)
C++_Classes_Templates/15079_200_0.txt
Sorry, something went wrong.
C++_Classes_Templates/15079_777_0.txt
No one assigned
C++_Classes_Templates/1157_454_0.txt
[ ![](https://avatars.githubusercontent.com/u/668303?s=64&v=4) Richiban ](/Richiban) Dec 4, 2017
C++_Classes_Templates/1157_532_0.txt
Converted from issue
C++_Classes_Templates/15079_505_0.txt
> And you can't do that as part of your build process? it must be part of the > language?
C++_Classes_Templates/15079_142_0.txt
[ ![@AdamSpeight2008](https://avatars.githubusercontent.com/u/900107?s=80&u=a425550110a23d84f230a111fc73665c39dffeea&v=4) ](/AdamSpeight2008)
C++_Classes_Templates/C++_Classes_0_1.txt
w/cpp/language/noexcept_spec "cpp/language/noexcept spec") (C++11) Exceptions | [ ` throw ` -expression ](/w/cpp/language/throw "cpp/language/throw") --- | [ ` try ` \- ` catch ` block ](/w/cpp/language/try_catch "cpp/language/try catch") --- Namespaces | [ Namespace declaration ](/w/cpp/language...
C++_Classes_Templates/15079_337_0.txt
Copy link
C++_Classes_Templates/15079_726_0.txt
> Halting Problem
C++_Classes_Templates/15079_310_0.txt
Probably would be fine to evaluate expressions at compile time, but could we do that (theoretically) without "constexpr".
C++_Classes_Templates/15079_316_0.txt
Author
C++_Classes_Templates/15079_480_0.txt
A good solution today is better than a perfect solution tomorrow.
C++_Classes_Templates/C++_Classes_0_4.txt
ing literal") [ character ](/w/cpp/language/character_literal "cpp/language/character literal") – [ string ](/w/cpp/language/string_literal "cpp/language/string literal") [ ` nullptr ` ](/w/cpp/language/nullptr "cpp/language/nullptr") (C++11) [ user-defined (UDL) ](/w/cpp/language/user_literal "cpp/language/user ...
C++_Classes_Templates/15079_446_0.txt
[ @TonyValenti ](https://github.com/TonyValenti) And you can't do that as part of your build process? it must be part of the language?
C++_Classes_Templates/15079_112_0.txt
**[ iam3yal ](/iam3yal) ** commented Nov 8, 2016 •
C++_Classes_Templates/15079_688_0.txt
**[ Pzixel ](/Pzixel) ** commented Jan 30, 2017
C++_Classes_Templates/1157_393_0.txt
Quote reply
C++_Classes_Templates/1157_0_0.txt
Skip to content
C++_Classes_Templates/Constexprlikekeyword_55_0.txt
* * *
C++_Classes_Templates/15079_143_0.txt
Copy link
C++_Classes_Templates/172624_5_0.txt
* [ **Beginners** ](/forum/beginner/) * [ **Windows Programming** ](/forum/windows/) * [ **UNIX/Linux Programming** ](/forum/unices/) * [ **General C++ Programming** ](/forum/general/) * [ **Lounge** ](/forum/lounge/) * [ **Jobs** ](/forum/jobs/)
C++_Classes_Templates/15079_667_0.txt
###
C++_Classes_Templates/1157_120_0.txt
1 You must be logged in to vote
C++_Classes_Templates/172624_52_0.txt
std::array < PianoKeyNote ,12 > notes; //12 notes
C++_Classes_Templates/Constexprlikekeyword_128_0.txt
| | Your Email | ---|---
C++_Classes_Templates/15079_580_0.txt
Realistically, correct. Conceptually, it could, but difficult practically (as the discussions lead me), and opens up a can of worms if you try to take it too far.
C++_Classes_Templates/1157_261_0.txt
Something went wrong.
C++_Classes_Templates/15079_725_0.txt
[ @jrmoreno1 ](https://github.com/jrmoreno1)
C++_Classes_Templates/Constexprlikekeyword_153_0.txt
[ C# Global Keyword Text Substitution ](//www.codeproject.com/Questions/666052/Csharp-Global-Keyword-Text- Substitution)
C++_Classes_Templates/15079_766_0.txt
[ [Proposal] Expand const keyword usage to enable compile time enforcement of const semantics dotnet/csharplang#744 ](/dotnet/csharplang/issues/744)
C++_Classes_Templates/15079_706_0.txt
* ❤️ 1 reaction
C++_Classes_Templates/1157_208_0.txt
All reactions
C++_Classes_Templates/1157_155_0.txt
Comment options
C++_Classes_Templates/1157_11_0.txt
* [ Enterprise ](https://github.com/enterprise) * [ Teams ](https://github.com/team) * [ Startups ](https://github.com/enterprise/startups) * [ Education ](https://education.github.com)
C++_Classes_Templates/15079_550_0.txt
2. Minor: It's not as expressive as it can be.
C++_Classes_Templates/172624_118_0.txt
[ Home page ](/) | [ Privacy policy ](/privacy.do) © cplusplus.com, 2000-2024 - All rights reserved - _v3.3.3_ [ Spotted an error? contact us ](/contact.do?referrer=cplusplus.com%2Fforum%2Fbeginner%2F172624%2F)
C++_Classes_Templates/15079_385_0.txt
> [ @TonyValenti ](https://github.com/TonyValenti) [ > https://github.com/TonyValenti ](https://github.com/TonyValenti) > > Someone on here mentioned that compile times would increase. While that is > true, decreasing run times has more value to end users. I think that, > ideally, things should be "more pre-evaluated...
C++_Classes_Templates/15079_747_0.txt
---
C++_Classes_Templates/1157_496_0.txt
Since ` const ` is a part of the method declaration, the const correctness check is trivial.
C++_Classes_Templates/15079_289_0.txt
[ ![@redknightlois](https://avatars.githubusercontent.com/u/1045411?s=80&v=4) ](/redknightlois)
C++_Classes_Templates/1157_447_0.txt
All reactions
C++_Classes_Templates/15079_662_0.txt
---
C++_Classes_Templates/1157_481_0.txt
All reactions
C++_Classes_Templates/1157_70_0.txt
* 👍 28 * ❤️ 4
C++_Classes_Templates/1157_316_0.txt
All reactions
C++_Classes_Templates/Constexprlikekeyword_54_0.txt
Thanks. I updated the question.
C++_Classes_Templates/15079_744_0.txt
As for the program taking 5 years to complete and that being what it takes -- **that is exactly my point** .
C++_Classes_Templates/Constexprlikekeyword_77_0.txt
ASM
C++_Classes_Templates/1157_35_0.txt
To see all available qualifiers, see our [ documentation ](https://docs.github.com/search-github/github-code-search/understanding- github-code-search-syntax) .
C++_Classes_Templates/1157_260_0.txt
# {{title}}
C++_Classes_Templates/1157_234_0.txt
###
C++_Classes_Templates/15079_241_0.txt
[ ![@iam3yal](https://avatars.githubusercontent.com/u/3756641?s=80&u=b853037d90aa1b20e6864477d91be927aeed062c&v=4) ](/iam3yal)
C++_Classes_Templates/15079_131_0.txt
[ ![@iam3yal](https://avatars.githubusercontent.com/u/3756641?s=80&u=b853037d90aa1b20e6864477d91be927aeed062c&v=4) ](/iam3yal)
C++_Classes_Templates/15079_448_0.txt
All reactions
C++_Classes_Templates/1157_132_0.txt
Finally, it might be backward compatible with static functions that are marked with ` [Pure] ` .
C++_Classes_Templates/1157_112_0.txt
# {{title}}
C++_Classes_Templates/1157_56_0.txt
Quote reply
C++_Classes_Templates/15079_172_0.txt
###
C++_Classes_Templates/15079_283_0.txt
**[ iam3yal ](/iam3yal) ** commented Nov 10, 2016 •
C++_Classes_Templates/172624_115_0.txt
[ http://coliru.stacked-crooked.com/a/2af50167b7bbba9c ](http://coliru.stacked-crooked.com/a/2af50167b7bbba9c)
C++_Classes_Templates/1157_99_0.txt
# {{title}}
C++_Classes_Templates/172624_1_0.txt
* [ TUTORIALS ](/doc/) * [ REFERENCE ](/reference/) * [ ARTICLES ](/articles/) * [ FORUM ](/forum/)
C++_Classes_Templates/C++_Classes_7_2.txt
++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/language/d...
C++_Classes_Templates/1157_276_0.txt
Comment options
C++_Classes_Templates/15079_655_0.txt
Sorry, something went wrong.
C++_Classes_Templates/1157_162_0.txt
If it's not static, then surely it has state ( ` this ` ) and thus isn't pure?
C++_Classes_Templates/15079_646_0.txt
Copy link
C++_Classes_Templates/15079_543_0.txt
It's not about drawing lines, it's about building stairs, starting from the most simple and yet useful cases to the more complex cases.
C++_Classes_Templates/15079_751_0.txt
Sorry, something went wrong.
C++_Classes_Templates/1157_13_0.txt
* [ CI/CD & Automation ](https://github.com/solutions/ci-cd) * [ DevOps ](https://github.com/solutions/devops) * [ DevSecOps ](https://resources.github.com/devops/fundamentals/devsecops)
C++_Classes_Templates/15079_415_0.txt
180 hidden items Load more…
C++_Classes_Templates/1157_522_0.txt
3 You must be logged in to vote
C++_Classes_Templates/gcc_bugs_1_1.txt
ge.cgi?id=fields.html#cf_gcctarget "The machine that GCC will produce code for. That's the value you passed to ./configure --target.") | [ Build: ](page.cgi?id=fields.html#cf_gccbuild "The machine you are building on. That's the value you passed to ./configure --build.") | [ Known to work: ](page.cgi?id=fields.ht...
C++_Classes_Templates/1157_40_0.txt
{{ message }}
C++_Classes_Templates/1157_528_0.txt
Labels
C++_Classes_Templates/15079_263_0.txt
> I think that it's better to set the recursion depth as opposed to time limit > like in Clang
C++_Classes_Templates/1157_474_0.txt
###
C++_Classes_Templates/172624_43_0.txt
[ **Ericool** (522) ](/user/Ericool/)
C++_Classes_Templates/15079_781_0.txt
None yet
C++_Classes_Templates/15079_682_0.txt
---
C++_Classes_Templates/1157_228_0.txt
* 👍 3
C++_Classes_Templates/1157_202_0.txt
Author
C++_Classes_Templates/15079_186_0.txt
**[ Unknown6656 ](/Unknown6656) ** commented Nov 9, 2016 •
C++_Classes_Templates/15079_318_0.txt
**[ iam3yal ](/iam3yal) ** commented Nov 10, 2016
C++_Classes_Templates/15079_6_0.txt
* [ Actions Automate any workflow ](https://github.com/features/actions) * [ Packages Host and manage packages ](https://github.com/features/packages) * [ Security Find and fix vulnerabilities ](https://github.com/features/security) * [ Codespaces Instant dev environments ](https://github.com/features/codespace...
C++_Classes_Templates/15079_502_0.txt
> Trust me I'm fair! and no I didn't know what you mean, I don't say things to > tease people, I say them because I don't understand when I think that making > yourself clear is very important.
C++_Classes_Templates/15079_90_0.txt
Copy link
C++_Classes_Templates/C++_Classes_7_1.txt
/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/language/throw "cpp/language/throw") ...
C++_Classes_Templates/1157_247_0.txt
Something went wrong.
C++_Classes_Templates/1157_538_0.txt
Code
C++_Classes_Templates/15079_694_0.txt
All reactions
C++_Classes_Templates/Constexprlikekeyword_66_0.txt
[ Permalink ](/Answers/5163328/Constexpr-like-keyword-in-Csharp)
C++_Classes_Templates/15079_394_0.txt
Author
C++_Classes_Templates/15079_497_0.txt
Copy link
C++_Classes_Templates/15079_408_0.txt
I suppose that there could exist algorithm to decide if something is const. Something probably complex and slow (like Hindley-Milner Type-inference algorithm). Algorithm could return something like