Generics in C++ 3 - Multiple Template parameters, non object-type params | Modern Cpp Series Ep. 73

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 17

  • @happyr0077
    @happyr0077 6 หลายเดือนก่อน +2

    bhey this is so clear explanation

    • @MikeShah
      @MikeShah  6 หลายเดือนก่อน

      Cheers -- thanks for the kind words!

  • @syedimadhaqqi4340
    @syedimadhaqqi4340 19 วันที่ผ่านมา +2

    @5:43, I cannot understand the output "m" which is size_t.Can you please elaborate. What is "m" and why is this coming as output? Thanks in advance

    • @MikeShah
      @MikeShah  17 วันที่ผ่านมา

      This example might help: en.cppreference.com/w/cpp/types/type_index Different compilers may also produce different output here, so it's a good idea to have some map like structure if you need this.

    • @syedimadhaqqi4340
      @syedimadhaqqi4340 16 วันที่ผ่านมา +1

      thanks but what is 'm' ?

    • @MikeShah
      @MikeShah  16 วันที่ผ่านมา

      @@syedimadhaqqi4340 I believe 'm' in this case is for size_t (unsigned long, or maybe unsigned long long). Not sure why it's just 'm' instead of something more descriptive. Different compilers may produce different results here, as I recall clang++ might return the full name versus g++.

  • @ieduardoms
    @ieduardoms ปีที่แล้ว +2

    Thank you very much, Mike. This series is great, you explain very clear.

  • @dhanushs1802
    @dhanushs1802 2 ปีที่แล้ว +1

    Very neatly explained as always. Thank you.

  • @joshbrice5678
    @joshbrice5678 2 ปีที่แล้ว +2

    Hi, Make. I have successfully completed that project (Drawing a colored triiangle using single vertex buffer object). I did not use the GLSL files, but wrote the shading language code in main.cpp. Once I separated it, it would report an error. I don't know why, but this can be figured out slowly, and it is not a big problem. Thanks!

    • @joshbrice5678
      @joshbrice5678 2 ปีที่แล้ว +1

      I found out that Apple has replaced OpenGL with Metal, although OpenGL is still widely used, do we need to learn OpenGl in depth? Also, should we learning Metal Shading Language? I am really confused. thank you very much, thank you Mike.

    • @MikeShah
      @MikeShah  2 ปีที่แล้ว +4

      @@joshbrice5678 OpenGL as we're learning in the OpenGL series (th-cam.com/play/PLvv0ScY6vfd9zlZkIIqGDeG5TUWswkMox.html) remains highly relevant. Apple is not doing any more upgrades to the API however. I forsee OpenGL being reletively stable for the next 3-5 years still on Apple, and even longer on other platforms. Eventually I will do something on youtube or my courses with Vulkan or DirectX as well, as it's good to learn a few APIs, and the transition is not as difficulty once you know one (e.g. OpenGL).

    • @joshbrice5678
      @joshbrice5678 2 ปีที่แล้ว +1

      @@MikeShah Thanks 🙏, i got it. Grateful.☕️

  • @ThislsYusuf
    @ThislsYusuf ปีที่แล้ว +1

    What is the typeid of 'm' specifically? 5:38

    • @MikeShah
      @MikeShah  ปีที่แล้ว +1

      I believe the names returned are implementation defined, so 'm' has been decided for size_t perhaps? You might be able to use a tool like c++filt to further decipher type names.

    • @ThislsYusuf
      @ThislsYusuf ปีที่แล้ว +1

      @@MikeShah I see, I though its a one-to-one result like 'i' is for integer. Thanks!