|
Boost : |
Subject: Re: [boost] [interest] Type Aspects and compile-time constraints
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-02-08 18:04:16
On Wed, Feb 8, 2012 at 2:44 PM, Beren Minor <beren.minor+boost_at_[hidden]>wrote:
> Hi everyone,
>
[...]
> TL;DR:
>
> 1. OpenGL sucks, I implemented compile-time constraints wrapping the
> functions calls.
> 2. Thinking about compile-time constraints made me qualify the types
> in use with a general mechanism describing the type's "aspects".
> 3. Aspects are axises and a given set of predefined values on these
> axises using which a type and its properties can be described.
> 4. Constraints can then be easily written as MPL checks on aspects
> axises and values as long as type aspects are formalized.
> 5. Does it already exist? Is that interesing? Should I try to go
> deeper in the abstraction?
>
Looks to me like the traits idiom (e.g., std::iterator_traits). Perhaps a
concrete example will illustrate your point better?
- Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk