Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/C++/CPP Grammar/CPP template/CPP Template Parameter/
SFINAE
Search

SFINAE

Creator
Creator
Seonglae Cho
Created
Created
2022 Nov 17 22:32
Editor
Editor
Seonglae Cho
Edited
Edited
2022 Nov 17 22:33
Refs
Refs
CPP enable_if

Substitution failure is not an error

템플릿 매개변수에 자료형이나 값을 넣을 수 없어도 오류가 발생하지 않는 상황
이를 이용한 프로그래밍 테크닉을 의미하기도
 
 
C++ SFINAE examples?
I like using SFINAE to check boolean conditions. template void div(char(*)[I % 2 == 0] = 0) { /* this is taken when I is even */ } template void div(char(*)[I % 2 == 1] = 0) { /* this is taken when I is odd */ } It can be quite useful.
C++ SFINAE examples?
https://stackoverflow.com/questions/982808/c-sfinae-examples
C++ SFINAE examples?
 
 
 

Recommendations

Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/C++/CPP Grammar/CPP template/CPP Template Parameter/
SFINAE
Copyright Seonglae Cho