|
paludis Version 3.0.2
The one true package mangler
|
#include <named_value.hh>
Public Types | |
| typedef K_ | KeyType |
| typedef V_ | ValueType |
A NamedValue is used to hold a member of type V_ for a class.
NamedValue is used to simplify 'plain old data' style classes, and to provide compiler-time-checked named parameters for functions. Use thestruct.themember() and thestruct.themember() = to access the real underlying values.
Usually a struct containing NamedValue objects will be constructed using the make_named_values() function. For each NamedValue object, make_named_values() takes a parameter in the form n::whatever_K_is() = the_value.
In all cases, NamedValue members are listed in name-sorted order, and the same name is used for K_ and the member name.