
// find all foreign keys fields typedef mpl::filter_view
mpl::_, tags::foreign> >::type iter_2; ^^^^^^ not needed
Why are you calling this type sequence "iter_2"? It's not an iterator, is it?
Sorry this was my error. But how can I use the filter_view result to
do something useful? For what I understand the filter_view results in
a lazy forward sequence and though, why not use it with the transform1
algorithm. The following code displays what I trying to do.
#include "boost/mpl/vector.hpp"
#include "boost/mpl/list.hpp"
#include
, tags::primary > >::type primary_key_t;
template <typename T>
struct add_vector
{
typedef mpl::at_c< T, 0 >::type field_t;
typedef std::vectormpl::_,
tags::foreign> > foreign_keys_view_t;
typedef mpl::transform1< foreign_keys_view_t, add_vectormpl::_1
::type foreign_key_vectors_t;
int _tmain(int argc, _TCHAR* argv[]) { return 0; } Regards, Christian