Boost logo

Boost Users :

Subject: [Boost-users] [Concept] Ignoring return types
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2011-08-03 05:51:53


I have a template that I instantiate with a type that has to be
nullary callable, so

template <typename NullaryCallable> struct X { /*....*/ };

I'd like to be a good boy scout here, so I should constrain the
template parameter, so

template <typename NullaryCallablle> struct X
{
    BOOST_CONCEPT_ASSERT(( Generator<NullaryCallable, void> ));
    // ...
};

However, that constrains it to be nullary callable and returning void, and
I'd prefer to avoid the void condition.

Is all that sensible, true, and fixable?

Thx

- Rob.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net