std::codecvt<InternT,ExternT,StateT>:: always_noconv, do_always_noconv
| Localization library | |||||||||||||||||||||||||
| Regular expressions library (C++11) | |||||||||||||||||||||||||
| Formatting library (C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
codecvt::always_noconv
codecvt::do_always_noconv
|
||||
|
헤더 파일에 정의됨
<locale>
|
||
| (1) | ||
|
public
:
bool always_noconv ( ) const throw ( ) ; |
(C++11 이전) | |
|
public
:
bool always_noconv ( ) const noexcept ; |
(C++11 이후) | |
| (2) | ||
|
protected
:
virtual bool do_always_noconv ( ) const throw ( ) ; |
(C++11 이전) | |
|
protected
:
virtual bool do_always_noconv ( ) const noexcept ; |
(C++11 이후) | |
do_always_noconv
멤버 함수를 호출합니다.
반환값
true 이 변환 패싯이 변환을 수행하지 않는 경우, false 그렇지 않은 경우.
비변환 특수화 std:: codecvt < char , char , std:: mbstate_t > 는 true 를 반환합니다.
참고 사항
이 함수는 예를 들어 std::basic_filebuf::underflow 와 std::basic_filebuf::overflow 구현에서 사용될 수 있으며, std::basic_filebuf 에 임베드된 로케일이 어떠한 변환도 수행하지 않는다는 것이 알려진 경우, std::codecvt::in 이나 std::codecvt::out 를 호출하는 대신 벌크 문자 복사를 사용하기 위함입니다.
예제
#include <iostream> #include <locale> int main() { std::cout << "The non-converting char<->char codecvt::always_noconv() returns " << std::boolalpha << std::use_facet<std::codecvt<char, char, std::mbstate_t>>( std::locale() ).always_noconv() << '\n' << "while wchar_t<->char codecvt::always_noconv() returns " << std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t>>( std::locale() ).always_noconv() << '\n'; }
출력:
The non-converting char<->char codecvt::always_noconv() returns true while wchar_t<->char codecvt::always_noconv() returns false