【发布时间】:2011-06-18 16:54:09
【问题描述】:
从此:
// parts of c++0x std
#include <boost/bind.hpp>
#include <boost/function.hpp>
#ifndef _IGraphElement_h_
#define _IGraphElement_h_
using namespace std ;
template <typename DataType >
class IGraphElement : public IGraphElementBase{
typedef boost::function<void(DataType)> Function;
typedef std::vector<Function> FunctionSequence; // (line *)
typedef FunctionSequence::iterator FunctionIterator; // (line **)
//...
};
C2146和C4430同时上线**!(如何解决?
【问题讨论】:
-
当您遇到模板和
typedef错误时,您有 85% 的机会忘记了typename。:)
标签: c++ visual-studio visual-studio-2008 boost