Simbody  3.6
SimTK::ArrayIndexTraits< bool > Struct Template Reference

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

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

◆ size_type

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

◆ difference_type

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

Member Function Documentation

◆ max_size()

static size_type SimTK::ArrayIndexTraits< bool >::max_size ( )
inlinestatic

The documentation for this struct was generated from the following file: