has_facet man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

has_facet(3C++)			       -		       has_facet(3C++)

Standard C++ Library Copyright 1998, Rogue Wave Software, Inc.

NAME
       has_facet

	- A function template used to determine if a locale has a given facet.

SYNOPSIS
       #include <locale>
       template <class Facet> bool has_facet(const locale&) throw();

DESCRIPTION
       has_facet  returns  true	 if  the  requested  facet is available in the
       locale. Otherwise it returns false.   You specify  the  facet  type  by
       explicitly including the template parameter (see the example below).

       Note that if your compiler cannot overload function templates on return
       type, then you need  to	use  an	 alternative_has_facet	template.  The
       alternative  template  takes an additional argument that's a pointer to
       the type of facet you want to check  on.	 The  declaration  looks  like
       this:

       template <class Facet>
       const bool has_facet(const locale&, Facet*) throw();

       The example below shows the use of both variations of has_facet.

EXAMPLE
       //
       // hasfacet.cpp
       //

       #include <iostream>

       int main ()
       {
 using namespace std;

 locale loc;

#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
 cout << has_facet<ctype<char> >(loc) << endl;
#else
 cout << has_facet(loc,(ctype<char>*)0) << endl;
#endif

 return 0;
}

SEE ALSO
       locale, facets, use_facet

Rogue Wave Software		  02 Apr 1998		       has_facet(3C++)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net