티스토리 뷰
함수 bool 출력값을 뒤집어주는 간단한 wrapper를 짜려했는데, 생각보다 귀찮은게 존재했다
그냥 함수도 받고, 함수 객체도 받아야하기 때문
type erasing 을 수행함. 덕분에 const 설정도 casting에 의해 날라감
TODO: 내역 추가
function 을 보관하는 과정에서 cast 이용하기에 const 날라감
https://modoocode.com/254 https://stackoverflow.com/questions/18453145/how-is-stdfunction-implemented https://stackoverflow.com/questions/14936539/how-stdfunction-works https://lesleylai.info/en/const-correcness-std-function/ https://stackoverflow.com/questions/5450159/type-erasure-techniques?rq=1 https://isocpp.org/blog/2013/08/quick-q-how-is-stdfunction-implemented-stackoverflow https://stackoverflow.com/questions/30272694/how-to-implement-a-type-eraser-for-stdfunction-like-classes https://akrzemi1.wordpress.com/2013/11/18/type-erasure-part-i/ https://quuxplusone.github.io/blog/2019/03/18/what-is-type-erasure/
https://stackoverflow.com/questions/50763308/stdfunction-has-performances-issues-how-to-avoid-it https://www.modernescpp.com/index.php/c-core-guidelines-type-erasure https://github.com/Beyond-Engine/functions
- Total
- Today
- Yesterday