+ 1
what is this hardware concurrency as 1
what's the difference between thread::hardware_concurrency; and thread::hardware_concurrency(); https://www.sololearn.com/compiler-playground/cFRyaBDsHOKh/#cpp https://code.sololearn.com/cFRyaBDsHOKh/?ref=app
2 Answers
+ 1
As I understand, the first form is just the address of the function, and usefull only when one is planning of using function pointers. So the value 1 is meaningless.
The second form is the static member function of std::thread, which:
"Returns the number of concurrent threads supported by the implementation. The value should be considered only a hint."
+ 1
I understand that function name is considered a function address or function pointer and it does not require & sign before name
But i have used it as auto. So, shouldn't it print address rather than 1? How that 1 is possible as adress ? Not only on sololearn, same 1 is obsereved on visual studio 2019 as well