Boost logo

Boost :

From: Michael Goldshteyn (mgoldshteyn_at_[hidden])
Date: 2005-08-08 09:58:55

Example 6: complex searches and foreign keys
See source code.

This program illustrates some advanced techniques that can be applied for
complex data structures using multi_index_container. Consider a car_model
class for storing information about automobiles. On a first approach,
car_model can be defined as:

struct car_model
  std::string model;
  std:string manufacturer;
  int price;

This definition has a design flaw that any reader acquainted with relational
databases can easily spot: The manufacturer member is duplicated among all
cars having the same manufacturer.

This definition also has a syntax error that any C++ programmer can easily 
spot! :)

Boost list run by bdawes at, gregod at, cpdaniel at, john at