Boost logo

Boost Users :

From: fmonkey_at_[hidden]
Date: 2004-03-09 12:52:27


This may be a silly question, but why does the following code give me a
compile error (only on Linux BTW, not Windows):

template<typename TreeIterT>
void ClassName::compile_something(const TreeIterT& iter, compile_context
&ctx)
{
    const TreeIterT::value_type& ident = get_first_leaf(*iter);
}

In member function `void ClassName::compile_something(const
   TreeIterT&, CompileContext&)':
128: error: syntax error before `&' token

Also:

template<typename TreeNodeT>
void ClassName::compile_something_else(const TreeNodeT &tree,
compile_context &ctx)
{
    TreeNodeT::const_iterator iter = tree.begin();
}

In member function `void ClassName::compile_something_else(const
138: error: syntax error before `=' token

Any idea what is causing this?


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