Simbody  3.6
SimTK::ArrayIndexTraits< unsigned short > Struct Template Reference

Specialization of ArrayIndexTraits for unsigned short used as an index. More...

Public Types

typedef unsigned short size_type
 
typedef int difference_type
 

Static Public Member Functions

static size_type max_size ()
 

Detailed Description

template<>
struct SimTK::ArrayIndexTraits< unsigned short >

Specialization of ArrayIndexTraits for unsigned short used as an index.

We don't have any bits to spare here so we want to allow the full 65535 elements for an unsigned short indexed container. That means the index difference range is -65534..+65534 which doesn't fit in a short so we have to use an int for difference_type to accommodate the whole range.

Member Typedef Documentation

◆ size_type

typedef unsigned short SimTK::ArrayIndexTraits< unsigned short >::size_type

◆ difference_type

typedef int SimTK::ArrayIndexTraits< unsigned short >::difference_type

Member Function Documentation

◆ max_size()

static size_type SimTK::ArrayIndexTraits< unsigned short >::max_size ( )
inlinestatic

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