Simbody
Public Types | Static Public Member Functions

SimTK::ArrayIndexTraits< bool > Struct Template Reference

Specialization of ArrayIndexTraits for bool used as an index. More...

#include <Array.h>

List of all members.

Public Types

typedef unsigned char size_type
typedef signed char difference_type

Static Public Member Functions

static size_type max_size ()

Detailed Description

template<>
struct SimTK::ArrayIndexTraits< bool >

Specialization of ArrayIndexTraits for bool used as an index.

OK, this seems unlikely but it works fine -- you get a container that can hold only two elements indexed by either false (0) or true (1). You'll get warnings if you try to index with an ordinary int. If anyone finds a legitimate use for this, please post to the forum and let us know!


Member Typedef Documentation

typedef unsigned char SimTK::ArrayIndexTraits< bool >::size_type
typedef signed char SimTK::ArrayIndexTraits< bool >::difference_type

Member Function Documentation

static size_type SimTK::ArrayIndexTraits< bool >::max_size ( ) [inline, static]

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines