is_bind_expression 클래스
형식이 bind
를 호출하여 생성되었는지 테스트합니다.
구문
template<class Ty>
struct is_bind_expression {
static const bool value;
};
설명
Ty
형식이 bind
를 호출하여 반환된 형식인 경우에는 상수 멤버 value
가 true이고, 그렇지 않으면 false입니다.
예제
// std__functional__is_bind_expression.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>
void square(double x)
{
std::cout << x << "^2 == " << x * x << std::endl;
}
template<class Expr>
void test_for_bind(const Expr&)
{
std::cout << std::is_bind_expression<Expr>::value << std::endl;
}
int main()
{
test_for_bind(3.0 * 3.0);
test_for_bind(std::bind(square, 3));
return (0);
}
0
1
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기