First of all, note that I'm using C++03 (and C++11 is not an option). I'm using boost concept to check that a certain class is default-constructible:
BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<my_class>));
However, for some other class I'd like to assert that the type does not have a default constructor. Is there a way of doing this?
Update: to all those super-duper experts marking the question as duplicate or already answered without reading it: I state in the very first paragraph that I already use boost concept to check that classes are default-constructible (which is the question this is supposed to be a duplicate of). I also explicitly state that I can't use C++11, so type_traits
are not available to me. So, could somebody please point me to the specific part where my question was "already answered"? Because I haven't found it yet.
type_traits
, unfortunately. Strictly C++03.is_constructible
. Is it that hard to actually read the question?