Is this a good pattern: replacing a long function with a series of lambdas?
I recently run into the following situation.
Is this a good pattern: replacing a long function with a series of lambdas?
I recently run into the following situation.
Is it bad form to break out of Range-based for
I have a range-based for that operates over a std::vector
of objects (item
s), like so:
Is it bad form to break out of Range-based for
I have a range-based for that operates over a std::vector
of objects (item
s), like so:
operator”” in modern C++
I took an example I found on-line whereby a constexpr of the form _binary could be evaluated at compile time as an unsigned long long and then I tried to generalize it for any base from 2 to 36. For instance, 17b1234_baseChange would be evaluated from base 17 as ((1*17 +2)*17 + 3)*17 + 4 = 5624.
Polymorphic template container: shared_ptr vs reference_wrapper
Assuming we have two classes:
c++11 random: why different range of int and real?
In the c++11, we now have <random> to produce random number.
About uniform distributions, we have following int_distribution
and double_distribution
:
c++11 random: why different range of int and real?
In the c++11, we now have <random> to produce random number.
About uniform distributions, we have following int_distribution
and double_distribution
:
Const means Thread-safe? [closed]
Closed 8 years ago.
Avoiding std::forward and Rvalue References
I recently read the Google C++ Style Guide and especially one part catched my eye.