Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

visual-c++-2012

Explicit Return Type of Lambda

June 19, 2023 by Tarik

You can explicitly specify the return type of a lambda by using -> Type after the arguments list: []() -> Type { } However, if a lambda has one statement and that statement is a return statement (and it returns an expression), the compiler can deduce the return type from the type of that one … Read more

Categories c++ Tags c++, c++11, lambda, visual-c++, visual-c++-2012 Leave a comment

fastest way to negate a number

June 6, 2023 by Tarik

Use something that is readable, such as a *= -1; or a = -a; Leave the rest to the optimizer.

Categories c++ Tags c++, micro-optimization, visual-c++, visual-c++-2012, x86 Leave a comment

C++11 features in Visual Studio 2012

January 16, 2023 by Tarik

It’s worth noting that Visual Studio 2010 already had quite a bit of early C++11 support. So to summarize what is already linked to in other answers, here is what is new in Visual Studio 11 that was not part of Visual Studio 2010: rvalue references to version 2.1 from 2.0 lambdas to version 1.1 … Read more

Categories c++ Tags c++, c++11, visual-c++, visual-c++-2012 Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa