[C++ Korea] Effective Modern C++ Study item14 16 +신촌Seok-joon Yun
[C++ Korea] Effective Modern C++ Study item14 16 +신촌
Item 14 : Declare functions noexcept if they won't emit exceptions. +윤석준
Item 15 : Use constexpr whenever possible. +이동우
Item 16 : Make const member functions thread safe. +제한재
[C++ Korea] Effective Modern C++ Study item14 16 +신촌Seok-joon Yun
[C++ Korea] Effective Modern C++ Study item14 16 +신촌
Item 14 : Declare functions noexcept if they won't emit exceptions. +윤석준
Item 15 : Use constexpr whenever possible. +이동우
Item 16 : Make const member functions thread safe. +제한재
[C++ korea] Effective Modern C++ 신촌 Study Item20,21,23Seok-joon Yun
[C++ korea] Effective Modern C++ 신촌 Study Item20,21,23
Item 20, 21, 23
Item 20 : Use std::weak_ptr for std::shared_ptr-like pointers that can dangle. +정은식
Item 21 : Prefer std::make_unique and std::make_shared to direct use of new. +이동우
Item 23 : Understand std::move and std::forward. +제한재
C++은 10년 만에 C++11/14를 발표하면서 '모던 C++'이라는 이름으로 발전했습니다. 그만큼 새로운 기능들이 많이 추가되었습니다. 그리고 2017년, C++은 C++17이라는 이름으로 또 한 번의 발전을 준비하고 있습니다. 3년 주기로 빠르게 변화하는 모던 C++에 대비하기 위해, C++17에 추가될 주요 기능들을 살펴보고자 합니다.
이 발표는 이전에 발표했던 내용에서 일부 사례 추가 및 최신 내용으로 갱신한 버전입니다.
[C++ Korea] Effective Modern C++ Study item 24-26Seok-joon Yun
[C++ Korea] Effective Modern C++ Study item 24-26
Item 24: Distinguish universal references from rvalue references. +석정로
Item 25 : Use std::move on rvalue references,
std::forward on universal references. +서승덕
Item 26 : Avoid overloading on universal references. +윤석준
[TechDays Korea 2015] 녹슨 C++ 코드에 모던 C++로 기름칠하기Chris Ohk
기존에 작성해 놓은 C++ 코드에 모던 C++를 적용하기는 쉽지 않습니다. 막상 개선하려고 마음먹었다고 해도, 어디서부터 바꿔야 할 지 막막하기만 합니다. 이 세션에서는 기존 C++ 코드에서 모던 C++를 적용해 프로그램의 구조와 성능을 개선하는 방법에 대해서 설명합니다. 그리고 기존 C++ 코드에 모던 C++를 적용할 때 주의해야 될 점에 대해서도 살펴봅니다.
[C++ Korea 2nd Seminar] C++17 Key Features SummaryChris Ohk
C++은 10년 만에 C++11/14를 발표하면서 '모던 C++'이라는 이름으로 발전했습니다. 그만큼 새로운 기능들이 많이 추가되었습니다. 그리고 2017년, C++은 C++17이라는 이름으로 또 한 번의 발전을 준비하고 있습니다. 3년 주기로 빠르게 변화하는 모던 C++에 대비하기 위해, C++17에 추가될 주요 기능들을 살펴보고자 합니다.
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기Chris Ohk
C++11을 시작으로 모던 C++이 도입된 지도 어느새 6년이라는 시간이 흘렀습니다. 올해는 C++17 표준이 도입될 예정입니다. 그만큼 많이 개선되고 새로운 기능들이 많이 도입되었기에 실무에서 사용해보고 싶은 경우도 많습니다. 하지만 이미 서비스 중이라 기존 프로젝트를 새 버전의 VS로 마이그레이션하기 어려운 프로젝트가 많습니다. 그렇다고 아예 불가능한 일도 아닙니다. 이번 세미나에서는 기존 프로젝트를 새 버전의 VS로 마이그레이션하면서 발생했던 문제와 마이그레이션 이후 모던 C++을 사용하면서 발생했던 문제, 그리고 해결법을 설명하고자 합니다. 또한 새 버전의 VS에 생긴 유용한 기능들도 함께 알려드립니다.
This document discusses behavior trees, which are commonly used to direct behaviors for AI in games. It provides an overview of behavior tree theory, including the basic components of behavior trees like composites, services, decorators, tasks, and the blackboard. It then discusses behavior trees in Unreal Engine 4 specifically. The document also provides an example of how behavior trees could be used for an airplane dogfighting AI and includes references for further information.
[C++ korea] Effective Modern C++ 신촌 Study Item20,21,23Seok-joon Yun
[C++ korea] Effective Modern C++ 신촌 Study Item20,21,23
Item 20, 21, 23
Item 20 : Use std::weak_ptr for std::shared_ptr-like pointers that can dangle. +정은식
Item 21 : Prefer std::make_unique and std::make_shared to direct use of new. +이동우
Item 23 : Understand std::move and std::forward. +제한재
C++은 10년 만에 C++11/14를 발표하면서 '모던 C++'이라는 이름으로 발전했습니다. 그만큼 새로운 기능들이 많이 추가되었습니다. 그리고 2017년, C++은 C++17이라는 이름으로 또 한 번의 발전을 준비하고 있습니다. 3년 주기로 빠르게 변화하는 모던 C++에 대비하기 위해, C++17에 추가될 주요 기능들을 살펴보고자 합니다.
이 발표는 이전에 발표했던 내용에서 일부 사례 추가 및 최신 내용으로 갱신한 버전입니다.
[C++ Korea] Effective Modern C++ Study item 24-26Seok-joon Yun
[C++ Korea] Effective Modern C++ Study item 24-26
Item 24: Distinguish universal references from rvalue references. +석정로
Item 25 : Use std::move on rvalue references,
std::forward on universal references. +서승덕
Item 26 : Avoid overloading on universal references. +윤석준
[TechDays Korea 2015] 녹슨 C++ 코드에 모던 C++로 기름칠하기Chris Ohk
기존에 작성해 놓은 C++ 코드에 모던 C++를 적용하기는 쉽지 않습니다. 막상 개선하려고 마음먹었다고 해도, 어디서부터 바꿔야 할 지 막막하기만 합니다. 이 세션에서는 기존 C++ 코드에서 모던 C++를 적용해 프로그램의 구조와 성능을 개선하는 방법에 대해서 설명합니다. 그리고 기존 C++ 코드에 모던 C++를 적용할 때 주의해야 될 점에 대해서도 살펴봅니다.
[C++ Korea 2nd Seminar] C++17 Key Features SummaryChris Ohk
C++은 10년 만에 C++11/14를 발표하면서 '모던 C++'이라는 이름으로 발전했습니다. 그만큼 새로운 기능들이 많이 추가되었습니다. 그리고 2017년, C++은 C++17이라는 이름으로 또 한 번의 발전을 준비하고 있습니다. 3년 주기로 빠르게 변화하는 모던 C++에 대비하기 위해, C++17에 추가될 주요 기능들을 살펴보고자 합니다.
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기Chris Ohk
C++11을 시작으로 모던 C++이 도입된 지도 어느새 6년이라는 시간이 흘렀습니다. 올해는 C++17 표준이 도입될 예정입니다. 그만큼 많이 개선되고 새로운 기능들이 많이 도입되었기에 실무에서 사용해보고 싶은 경우도 많습니다. 하지만 이미 서비스 중이라 기존 프로젝트를 새 버전의 VS로 마이그레이션하기 어려운 프로젝트가 많습니다. 그렇다고 아예 불가능한 일도 아닙니다. 이번 세미나에서는 기존 프로젝트를 새 버전의 VS로 마이그레이션하면서 발생했던 문제와 마이그레이션 이후 모던 C++을 사용하면서 발생했던 문제, 그리고 해결법을 설명하고자 합니다. 또한 새 버전의 VS에 생긴 유용한 기능들도 함께 알려드립니다.
This document discusses behavior trees, which are commonly used to direct behaviors for AI in games. It provides an overview of behavior tree theory, including the basic components of behavior trees like composites, services, decorators, tasks, and the blackboard. It then discusses behavior trees in Unreal Engine 4 specifically. The document also provides an example of how behavior trees could be used for an airplane dogfighting AI and includes references for further information.
http://github.com/ipkn/crow
Crow 프로젝트에서 사용한 C++11 기법들을 실제 구현에 대한 설명을 포함하여 자세히 설명한 발표자료입니다.
C++11 features used in Crow
video:
http://youtu.be/MixS9c3mE6U
https://vimeo.com/119627253
1. raw string literals
" 이나 \ 는 문자열에 포함시킬 때 \를 한번더 붙여주어야 한다.
그러나 C++11에서는 R"()" 내에 스트링은 이러한 불편함을 없애준다.
2. vriadic templates
타입의 갯수가 정해져 있지 않은 클래스를 구현할 때 유용
3. lambda expression
캡쳐 설정에 유의 하여야 한다.
4. std::function
모든 callable가능한 타겟을 래핑한다.
5. std::bind
javascript의 clojure와 비슷한 기능, 파라미터의 상태를
함수 객체가 저장할 수가 있다.
6. std::async
비동기 실행을 위한 클래스, 잠재적으로 쓰레드를 생성하며, 쓰레드와 다른점은 return 값을 받을 수 있다.
7. 멀티패러다임을 지향하는 언어로써 함수형 언어의 기능도 흡수 하는 중. C++은 사용자의 능력에 따라 절차형, 객체지향형, 함수형등 자유자재로 구현 가능. 그러니 잘하자.
[C++ Korea 2nd Seminar] Ranges for The Cpp Standard LibraryDongMin Choi
Microsoft Melting Pot
C++ Korea 2nd Seminar
Ranges for The Cpp Standard Library
https://channel9.msdn.com/Events/Channel9-Korea/cplusplus/Ranges-for-The-C-Standard-Library
모던 C++의 시초인 C++11은 C++ 코드 전반에 많은 변화를 가져왔습니다. 그리고 최근 C++20의 표준위원회 회의가 마무리되었습니다. 내년에 C++20이 도입되면 C++11이 처음 도입되었을 때와 비슷한 규모, 또는 그 이상의 변화가 있을 것이라고 예상하고 있습니다. C++20에는 Concepts, Contract, Ranges, Coroutine, Module 등 굵직한 기능 외에도 많은 기능들이 추가될 예정입니다. 이번 세션에서는 C++20에 추가될 주요 기능들을 살펴보고자 합니다.
10. Template 타입 추론
template <typename T>
void f(T param);
f(expr);
expr??
T가 레퍼런스나 포인터이고 universal reference가 아닐 때
T가 universal reference 일 때
T가 레퍼런스나 포인터가 아닐 때
11. Template 타입 추론
레퍼런스나 포인터이고 universal reference가 아닐 때
template <typename T>
void f(T& param);
int x = 22;
const int cx = x;
const int& rx = x;
f(x); // int&
f(cx); // const int&
f(rx); // const int&
12. Template 타입 추론
레퍼런스나 포인터이고 universal reference가 아닐 때
template <typename T>
void f(const T& param);
int x = 22;
const int cx = x;
const int& rx = x;
f(x); // const int&
f(cx); // const int&
f(rx); // const int&
13. Template 타입 추론
universal reference 일 때
template <typename T>
void f(T&& param);
int x = 22;
const int cx = x;
const int& rx = x;
f(x); // int&
f(cx); // const int&
f(rx); // const int&
f(22); // int&&
14. Template 타입 추론
레퍼런스나 포인터가 아닐 때
template <typename T>
void f(T param);
int x = 22;
const int cx = x;
const int& rx = x;
f(x); // int
f(cx); // int
f(rx); // int
15. auto 타입 추론
레퍼런스나 포인터이고 universal reference가 아닐 때
int x = 22;
const int cx = x;
const int& rx = x;
auto& v1 = x; // int&
auto& v2 = cx; // const int&
auto& v3 = rx; // const int&
const auto& v1 = x; // const int&
const auto& v2 = cx; // const int&
const auto& v3 = rx; // const int&
16. auto 타입 추론
universal reference 일 때
int x = 22;
const int cx = x;
const int& rx = x;
auto&& v1 = x; // int&
auto&& v2 = cx; // const int&
auto&& v3 = rx; // const int&
auto&& v4 = 27; // int&&
17. auto 타입 추론
레퍼런스나 포인터가 아닐 때
int x = 22;
const int cx = x;
const int& rx = x;
auto v1 = x; // int
auto v2 = cx; // int
auto v3 = rx; // int
18. auto 타입 추론
Template 타입 추론과 동일함
하지만 braced initializer!
template <typename T>
void f(T param);
f( { 1, 2, 3 } ); // error!
auto x1 { 1, 2, 3 }; // std::intializer_list<int>
auto x2 = { 1, 2, 3 }; // std::intializer_list<int>
19. Lambda Capture 타입 추론
By reference : template과 동일
By value : template과 동일하지만 cv 키워드가 유지
const int cx = 0;
auto lam = [cx] {...}
class UpToCompiler
{
private:
const int cx;
...
}
20. 아까 그 문제!
Data GetData(int iID)
{
this->_mapData.find(iID)->second;
}
auto& iter = GetData(iID);