A compile-time data store that contains arbitrary data types is accessed via methods that ensure type safety. A type construct (e.g., a C++ template) is instantiated at compile time and generates a data store that contains arbitrarily-typed data objects, such as integers, characters, pointers and so forth. The construct includes a Put method to put any element (object) of a listed type (e.g., of a typelist) in the data store, and a Get method to retrieve the element from the data store. The Put method maintains a type index in association with each stored in the data store. The Get method validates that the type of object that was requested in the call to the Get method matches the object type that was stored in the Put method. When run, the Get method returns the element data upon a type match, otherwise the Get method generates an exception.

 
Web www.patentalert.com

> Icon for a portion of a display screen

~ 00317