GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::codecvt::always_noconv,do_always_noconv(3) C++ Standard Libary std::codecvt::always_noconv,do_always_noconv(3)

std::codecvt::always_noconv,do_always_noconv - std::codecvt::always_noconv,do_always_noconv


Defined in header <locale>
public: (until C++11)
bool always_noconv() const throw();
public: (since C++11)
bool always_noconv() const noexcept; (1)
protected: (until C++11)
virtual bool do_always_noconv() const throw(); (2)
protected: (since C++11)
virtual bool do_always_noconv() const noexcept;


1) Public member function, calls the member function do_always_noconv of the most
derived class.
2) Returns true if both do_in() and do_out() return std::codecvt_base::noconv for
all valid inputs.


true if this conversion facet performs no conversions, false otherwise.


The non-converting specialization std::codecvt<char, char, std::mbstate_t> returns
true


This function may be used e.g. in the implementation of
std::basic_filebuf::underflow and std::basic_filebuf::overflow to use bulk character
copy instead of calling std::codecvt::in or std::codecvt::out if it is known that
the locale imbued in the std::basic_filebuf does not perform any conversions.

// Run this code


#include <locale>
#include <iostream>


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

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.