Boost logo

Boost Users :

Subject: [Boost-users] [boost][mpl] Detect a type sequence type
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2012-12-07 11:15:15


Hi,

I am writing some functions and classes that accept a sequence of type (
boost::mpl::vector/list currently) as template parameter.
I'm looking for a way to enhance type checking by making sure the provided
types are... type sequences.

I didn't find anything relevant in standard or boost type_trait libraries.

So far, I'm guessing there is no way to check that, mainly because such
types would be template instances, which make checking this like checking
if a type is an instance of a template which is impossible right now (as
far as I know anyway).

My question is: what are possible ways to enhance type checking on type
sequence types?
I know some boost developers around here make great efforts to make sure
their meta programming libraries make early and good error reporting so
maybe they have a solution?

PS: I'm using Visual Studio 2012 so I can't use variadic template yet ;___;
(can't rely on the CTP)

Joel Lamotte



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