SlideShare a Scribd company logo
DR: Relaxing the structured
bindings customization point
finding rules
ADL(Argument Dependent Lookup)
인수에 의존해 이름 공간을 검색하는 기능
ADL 때문에 내가 원하는 함수를
부를 수 없는 경우가 있다
구조화된 바인딩을 사용할
때 멤버 변수에 get() 이
있으면 이것이 ADL 에 의해
우선시 되어서 제대로 동작
하지 않는 경우가 있었기
때문에 이를 사용자가
커스터마이징해서 쓸 수
있도록 규칙을 완화하였다.
Now this rule has been fixed
in a way that the member
version is preferred only if
it’s a template and its first
template parameter is a
non-type template
parameter.

More Related Content

More from 진화 손

C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
C++ 20 Make stateful allocator propagation more consistent for operator+(basi...C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
진화 손
 
C++ 20 Unevaluated asm-declaration in constexpr functions
C++ 20 Unevaluated asm-declaration in constexpr functionsC++ 20 Unevaluated asm-declaration in constexpr functions
C++ 20 Unevaluated asm-declaration in constexpr functions
진화 손
 
C++20 Utility functions to implement uses-allocator construction
C++20 Utility functions to implement uses-allocator constructionC++20 Utility functions to implement uses-allocator construction
C++20 Utility functions to implement uses-allocator construction
진화 손
 
C++ 20 std__reference_wrapper for incomplete types
C++ 20 std__reference_wrapper for incomplete typesC++ 20 std__reference_wrapper for incomplete types
C++ 20 std__reference_wrapper for incomplete types
진화 손
 
C++ 20 Stronger Unicode requirements
C++ 20 Stronger Unicode requirementsC++ 20 Stronger Unicode requirements
C++ 20 Stronger Unicode requirements
진화 손
 
C++20 Concepts library
C++20 Concepts libraryC++20 Concepts library
C++20 Concepts library
진화 손
 
C++20 Coroutine
C++20 CoroutineC++20 Coroutine
C++20 Coroutine
진화 손
 
C++ 20 Relaxing the range-for loop customization point finding rules
C++ 20 Relaxing the range-for loop customization point finding rulesC++ 20 Relaxing the range-for loop customization point finding rules
C++ 20 Relaxing the range-for loop customization point finding rules
진화 손
 
C++20 explicit(bool)
C++20 explicit(bool)C++20 explicit(bool)
C++20 explicit(bool)
진화 손
 
C++20 std::map::contains
C++20 std::map::containsC++20 std::map::contains
C++20 std::map::contains
진화 손
 
C++20 Comparing unordered containers
C++20 Comparing unordered containersC++20 Comparing unordered containers
C++20 Comparing unordered containers
진화 손
 
C++20 Attributes [[likely]] and [[unlikely]]
C++20 Attributes [[likely]] and [[unlikely]]C++20 Attributes [[likely]] and [[unlikely]]
C++20 Attributes [[likely]] and [[unlikely]]
진화 손
 
C++ 20 Lambdas in unevaluated contexts
C++ 20 Lambdas in unevaluated contextsC++ 20 Lambdas in unevaluated contexts
C++ 20 Lambdas in unevaluated contexts
진화 손
 
C++20 Library support for operator<=> <compare>
C++20 Library support for operator<=> <compare>C++20 Library support for operator<=> <compare>
C++20 Library support for operator<=> <compare>
진화 손
 
C++20 Atomic std::shared_ptr and std::weak_ptr
C++20 Atomic std::shared_ptr and std::weak_ptrC++20 Atomic std::shared_ptr and std::weak_ptr
C++20 Atomic std::shared_ptr and std::weak_ptr
진화 손
 
C++20 Default member initializers for bit-fields
C++20 Default member initializers for bit-fieldsC++20 Default member initializers for bit-fields
C++20 Default member initializers for bit-fields
진화 손
 
C++ 20 constexpr for algorithm and utility
C++ 20 constexpr for  algorithm and utilityC++ 20 constexpr for  algorithm and utility
C++ 20 constexpr for algorithm and utility
진화 손
 
C++17 init-statements for if and switch
C++17 init-statements for if and switchC++17 init-statements for if and switch
C++17 init-statements for if and switch
진화 손
 
C++17 Aggregate classes with base classes
C++17 Aggregate classes with base classesC++17 Aggregate classes with base classes
C++17 Aggregate classes with base classes
진화 손
 
C++17 std::byte
C++17 std::byteC++17 std::byte
C++17 std::byte
진화 손
 

More from 진화 손 (20)

C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
C++ 20 Make stateful allocator propagation more consistent for operator+(basi...C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
 
C++ 20 Unevaluated asm-declaration in constexpr functions
C++ 20 Unevaluated asm-declaration in constexpr functionsC++ 20 Unevaluated asm-declaration in constexpr functions
C++ 20 Unevaluated asm-declaration in constexpr functions
 
C++20 Utility functions to implement uses-allocator construction
C++20 Utility functions to implement uses-allocator constructionC++20 Utility functions to implement uses-allocator construction
C++20 Utility functions to implement uses-allocator construction
 
C++ 20 std__reference_wrapper for incomplete types
C++ 20 std__reference_wrapper for incomplete typesC++ 20 std__reference_wrapper for incomplete types
C++ 20 std__reference_wrapper for incomplete types
 
C++ 20 Stronger Unicode requirements
C++ 20 Stronger Unicode requirementsC++ 20 Stronger Unicode requirements
C++ 20 Stronger Unicode requirements
 
C++20 Concepts library
C++20 Concepts libraryC++20 Concepts library
C++20 Concepts library
 
C++20 Coroutine
C++20 CoroutineC++20 Coroutine
C++20 Coroutine
 
C++ 20 Relaxing the range-for loop customization point finding rules
C++ 20 Relaxing the range-for loop customization point finding rulesC++ 20 Relaxing the range-for loop customization point finding rules
C++ 20 Relaxing the range-for loop customization point finding rules
 
C++20 explicit(bool)
C++20 explicit(bool)C++20 explicit(bool)
C++20 explicit(bool)
 
C++20 std::map::contains
C++20 std::map::containsC++20 std::map::contains
C++20 std::map::contains
 
C++20 Comparing unordered containers
C++20 Comparing unordered containersC++20 Comparing unordered containers
C++20 Comparing unordered containers
 
C++20 Attributes [[likely]] and [[unlikely]]
C++20 Attributes [[likely]] and [[unlikely]]C++20 Attributes [[likely]] and [[unlikely]]
C++20 Attributes [[likely]] and [[unlikely]]
 
C++ 20 Lambdas in unevaluated contexts
C++ 20 Lambdas in unevaluated contextsC++ 20 Lambdas in unevaluated contexts
C++ 20 Lambdas in unevaluated contexts
 
C++20 Library support for operator<=> <compare>
C++20 Library support for operator<=> <compare>C++20 Library support for operator<=> <compare>
C++20 Library support for operator<=> <compare>
 
C++20 Atomic std::shared_ptr and std::weak_ptr
C++20 Atomic std::shared_ptr and std::weak_ptrC++20 Atomic std::shared_ptr and std::weak_ptr
C++20 Atomic std::shared_ptr and std::weak_ptr
 
C++20 Default member initializers for bit-fields
C++20 Default member initializers for bit-fieldsC++20 Default member initializers for bit-fields
C++20 Default member initializers for bit-fields
 
C++ 20 constexpr for algorithm and utility
C++ 20 constexpr for  algorithm and utilityC++ 20 constexpr for  algorithm and utility
C++ 20 constexpr for algorithm and utility
 
C++17 init-statements for if and switch
C++17 init-statements for if and switchC++17 init-statements for if and switch
C++17 init-statements for if and switch
 
C++17 Aggregate classes with base classes
C++17 Aggregate classes with base classesC++17 Aggregate classes with base classes
C++17 Aggregate classes with base classes
 
C++17 std::byte
C++17 std::byteC++17 std::byte
C++17 std::byte
 

C++ 20 Relaxing the structured bindings customization point finding rules

  • 1. DR: Relaxing the structured bindings customization point finding rules
  • 2. ADL(Argument Dependent Lookup) 인수에 의존해 이름 공간을 검색하는 기능
  • 3. ADL 때문에 내가 원하는 함수를 부를 수 없는 경우가 있다
  • 4. 구조화된 바인딩을 사용할 때 멤버 변수에 get() 이 있으면 이것이 ADL 에 의해 우선시 되어서 제대로 동작 하지 않는 경우가 있었기 때문에 이를 사용자가 커스터마이징해서 쓸 수 있도록 규칙을 완화하였다. Now this rule has been fixed in a way that the member version is preferred only if it’s a template and its first template parameter is a non-type template parameter.