Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-06-07 16:40:33


All I can say is, "beware the multiple inheritance empty base class bloat"!

;-)

Avoiding macros is good, though.
-Dave

----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, June 07, 2001 5:23 PM
Subject: [boost] concept checking: BOOST_CLASS_REQUIRES

> Hi All,
>
> BOOST_CLASS_REQUIRES is a bit broken, but instead of fixing it I'm
> thinking of moving to the non-macro approach suggested by Bjarne:
>
> http://www.research.att.com/~bs/bs_faq2.html#constraints
>
> Here's how I envision the concept check working for a class:
>
>
> #include <boost/concept_check.hpp>
>
> namespace boost {
> template <class Concept>
> struct class_requires {
> class_requires() { function_requires<Concept>(); }
> };
> } // namespace boost
>
>
> namespace foo {
> template <class T>
> struct Vector
> : public boost::class_requires< boost::SGIAssignableConcept<T> >
> {
> };
> }// namespace foo
>
> struct bar {
> bar(int) { }
> private:
> bar(const bar&) { }
> };
>
> int main()
> {
> foo::Vector<bar> v;
> return 0;
> }
>
>
>
> ----------------------------------------------------------------------
> Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
> Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
> Summer Manager, AT&T Research phone: (973) 360-8185
> ----------------------------------------------------------------------
>
>
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk