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


Manual Reference Pages  -  TYPETRAIT (3)

NAME

FBB::TypeTrait - shortdesc

CONTENTS

SYNOPSIS

#include <bobcat/typetrait>

DESCRIPTION

FBB::TypeTrait is a traits class. It does not define any member functions or data members, but merely types. It can be used to determine the basic type and other characteristics of (const) plain, (const) pointer or (const) reference types. It was designed after Alexandrescu\(cqs (2001) TypeTraits template class.

The FBB::LpromotesR class template is used to determine, compile-time, whether its second (right-hand side) template type can be promoted to its first (left-hand side) template type.

The FBB::Use class template expects two typenames LHS and RHS and defines typename Use<LHS, RHS>::type as LHS if RHS can be promoted to LHS or it defines typename Use<LHS, RHS>::type as RHS.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

TypeTrait<TYPE>

TYPE is the template type parameter whose characteristics must be determined.

TypeTrait<TYPE> defines the type Plain: the plain type (the type without const, pointer, reference type indication) of any const or non-const plain, pointer, lvalue- or rvalue-reference type.

TypeTrait<TYPE> defines the following bool values:
o isClass: true if the template type argument represents a class (struct) type, false otherwise.
o isConst: true if the template type argument represents a const type, false otherwise.
o isPointer: true if the template type argument represents a pointer type, false otherwise.
o isR_Ref: true if the template type argument represents a rvalue reference type, false otherwise.
o isRef: true if the template type argument represents an lvalue reference type, false otherwise.

LpromotesR<LeftType, RightType>

LpromotesR<LeftType, RightType> defines the enum constant yes as 1 if an RightType argument can be promoted to LeftType value or object. The enum value yes is defined as 0 if no such constructor is available or if such a constructor is defined using the explicit keyword.

EXAMPLES

Here is an example using LpromotesR:

int main() { cout << \(dqstring promotes char const *: \(dq << LpromotesR<string, char const *>::yes << \(cq\n\(cq; // 1 cout << \(dqstring promotes string \(dq << LpromotesR<string, string>::yes << \(cq\n\(cq; // 1 cout << \(dqchar const * promotes string \(dq << LpromotesR<char const *, string>::yes << \(cq\n\(cq; // 0 }

FILES

bobcat/typetrait - defines the class interface

SEE ALSO

bobcat(7)
Alexandrescu A. (2001) Modern C++ Design, Addison-Wesley, Boston.

BUGS

None Reported.

DISTRIBUTION FILES

o bobcat_3.25.01-x.dsc: detached signature;
o bobcat_3.25.01-x.tar.gz: source archive;
o bobcat_3.25.01-x_i386.changes: change log;
o libbobcat1_3.25.01-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.25.01-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

Bobcat is an acronym of ‘Brokken\(cqs Own Base Classes And Templates\(cq.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).

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


libbobcat-dev_3&.25&.01-x&.tar&.gz FBB::TYPETRAIT (3bobcat) 2005-2015

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