see fix.
A

Index: src/support/lyxfunctional.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/lyxfunctional.h,v
retrieving revision 1.4
diff -u -r1.4 lyxfunctional.h
--- src/support/lyxfunctional.h 2000/10/13 14:10:35     1.4
+++ src/support/lyxfunctional.h 2000/10/13 14:45:17
@@ -25,7 +25,7 @@
        void_class_fun_t(C & ct, void(C::*p)(A))
                : c(ct), cmf(p) {}
        void operator()(A & a) const {
-               return (c.*cmf)(a);
+               (c.*cmf)(a);
        }
 private:
        C & c;
@@ -122,7 +122,7 @@
 
 
 template <class Cont, class Type, class MemRet>
-back_insert_fun_iterator<Cont, Type, MemRet>
+const_back_insert_fun_iterator<Cont, Type, MemRet>
 back_inserter_fun(Cont & cont, MemRet(Type::*p)() const)
 {
        return const_back_insert_fun_iterator<Cont, Type, MemRet>(cont, p);





On Fri, 13 Oct 2000, Jean-Marc Lasgouttes wrote:
> >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
>
> Lars> I have not tried to compile this yet, but can you try the
> Lars> current cvs (in two minutes).
>
> Seems to work, although there is a small typo in the void_memfun_t
> constructor.
>
> Hmm, I get:
>
> cxx: Error: ../../lyx-devel/src/support/lyxfunctional.h, line 128:
>           no suitable user-defined conversion from
>           "const_back_insert_fun_iterator<std::vector<std::string,
>           std::allocator<std::map<std::string, Language,
>           std::less<std::string>, std::allocator<std::pair<const
> std::string, Language>>>::key_type>>, Buffer, const std::string &>" to
> "back_insert_fun_iterator<std::vector<std::string,
>           std::allocator<std::map<std::string, Language,
>           std::less<std::string>, std::allocator<std::pair<const
> std::string, Language>>>::key_type>>, Buffer, const std::string &>" exists
> detected during instantiation of "back_insert_fun_iterator<Cont, Type,
> MemRet> back_inserter_fun(Cont &, MemRet (Type::*)() const) [with
> Cont=std::vector<std::string,
>                     std::allocator<std::map<std::string, Language,
>                     std::less<std::string>, std::allocator<std::pair<const
>                     std::string, Language>>>::key_type>>, Type=Buffer,
>                     MemRet=const std::string &]"
>         return const_back_insert_fun_iterator<Cont, Type, MemRet>(cont, p);
> ---------------^
> cxx: Error: ../../lyx-devel/src/support/lyxfunctional.h, line 28: a void
>           function may not return a value
>           detected during:
>             instantiation of "void void_class_fun_t<C, A>::operator()(A &)
>                       const [with C=BufferList, A=Buffer *]" at line 95 of
>                       "/usr/include/cxx/algorithm.cc"
>             instantiation of "Function std::for_each(InputIterator,
>                       InputIterator, Function) [with InputIterator=Buffer
> **, Function=void_class_fun_t<BufferList, Buffer *>]" return (c.*cmf)(a);
> -----------------------^
>
>
> JMarc

Reply via email to