Recent posts

์Šค๋งˆํŠธ ํฌ์ธํ„ฐ - shared_ptr

October 24 2021

shared_ptr ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์Šค๋งˆํŠธ ํฌ์ธํ„ฐ๊ฐ€ ํ•˜๋‚˜์˜ ๊ฐ์ฒด๋ฅผ ๊ฐ™์ด ์†Œ์œ ํ•ด์•ผํ•˜๋Š” ์ƒํ™ฉ ํ•˜๋‚˜์˜ ์ž์›์„ ๋ช‡๊ฐœ์˜ ํฌ์ธํ„ฐ๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๋Š”์ง€ ์ถ”์ ํ•˜๋Š” ํฌ์ธํ„ฐ control block์„ ํ• ๋‹นํ•˜์—ฌ ๋ณต์‚ฌ๋ฅผ ํ—ˆ์šฉ ๊ฐ shared_ptr ๊ฐ์ฒด์— ์ €์žฅ๋˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ์‹ค์ œ ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” control block์„ ํ• ๋‹น ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š”...

perfect forwarding

October 24 2021

์™„๋ฒฝํ•œ ์ „๋‹ฌ perfect forwarding wrapper ํ•จ์ˆ˜๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ

exception

October 23 2021

์˜ˆ์™ธ๋ž€? ์ •์ƒ์ ์ธ ์ƒํ™ฉ์—์„œ ๋ฒ—์–ด๋‚œ ๋ชจ๋“  ์˜ˆ์™ธ์ ์ธ ์ƒํ™ฉ๋“ค

decltype ํ‚ค์›Œ๋“œ

October 22 2021

decltype ์‹๋ณ„์ž ํ‘œํ˜„์‹์ด ์•„๋‹Œ ์‹์„ ์ธ์ž๋กœ ๋ฐ›๊ณ , ๊ทธ ํƒ€์ž…์„ T๋ผ๊ณ  ํ–ˆ์„ ๋•Œ ์‹์˜ ๊ฐ’์ด xvalue์ธ ๊ฒฝ์šฐ -> T&& ๋ฅผ ๋ฆฌํ„ด ์‹์˜ ๊ฐ’์ด lvalue์ธ ๊ฒฝ์šฐ -> T& ๋ฅผ ๋ฆฌํ„ด ์‹์˜ ๊ฐ’์ด prvalue์ธ ๊ฒฝ์šฐ -> T ๋ฅผ ๋ฆฌํ„ด decltype...