C++ Template Functions and Template Classes (Part 1)

preview_player
Показать описание
This video walks through several examples of C++ template functions and template classes, focusing on argument deduction, template member functions, and member template functions. We also showcase the different in overhead for passing parameters by value vs. by reference.

Outline
00:00 - Introduction
01:59 - Overview of C++ Templates
04:57 - Examples of C++ Function Templates
24:00 - Examples of C++ Class Templates
40:37 - Questions and Answers About C++ Templates
Рекомендации по теме
Комментарии
Автор

Wonderful! You are a gifted teacher. I have recently bitten the bullet to get a production level C++ going on one of my projects and have been in an intense study mode. I accidentally landed on this video a few minutes ago, and have it thoroughly.. just the level of detail and thoroughness that I need for my learning style. Will be checking out the entire playlist.

ramchillarege
Автор

i jus found you ar a legend, u don't know even ! love and respect.

mahadifamgate
Автор

Thanks for the vids Douglas in advance!

lazlo
Автор

The best explanations I've ever received! (and even given by myself :))

LeonovSeva
Автор

You are so generous to share this knowledge. Thanks much.

kailasm
Автор

Hello professor thanks a lot!!! Would you ever potentially do a course on looking at internals of STL implementation/ code review of stl internals? I find a lot of time production code is a lot different than example code from textbooks. Especially the implementations of the stl, which as a lot of hard code to read.

nc
Автор

great video professors and i hope every one aspiring to learn c++ watch the playlist.

dipeshpatil
Автор

Hello professor, thank you very much for this vid series on STL. Loved the way you taught❤️

shivessingh
Автор

Hi Professor, thanks for your help. I am totally digging your work.

vasisthakandarpa
Автор

Hi Professor,

could you recommend a course which helps build on the concept of OO programming in C++ to build software

Thanks and regards

ramanarora
Автор

@22:00 - You say "The if/else _statement_ doesn't explicitly yield a value, the ternary _operator_ does / I would choose ternary operator in production code" -does the compiler generate different instructions for the ternary operator vs the if-else?

mallninja
Автор

Visual Studio / Microsoft C++ doesn't support the use of a colon for specifying parameters by name... unless that's just a helper for CLion.

juansolo
Автор

@11:00 Line 25: I have never seen the syntax used between the parentheses. To learn more about it, what search word(s) would I enter into google?

fondueeundof
Автор

When should I use template<typename T&> and template<typename T*> vs template<typename T> ??

acamro
Автор

Hi There, Can we expect more videos in C++ series? It would be totally awesome. Thank you.

gauravarya
Автор

so are you saying that this

pair(T& f, T& s)
: first(f), second(s)
{}

is faster than

pair(T& f, T& s){
first = f;
second = s;
}

notice how they both are refrences were in your example one was not refrence.

tylerbertz
Автор

What would have happened if you write Pair( a &, b &) instead of Pair(const a &, const b &) in the constructor? Why do we use const reference?

crpatel