Am Donnerstag, 28. Mai 2015 um 23:23:07, schrieb pdv <pdvissch...@edpnet.be>
> On 19/05/15 11:25, Jean-Marc Lasgouttes wrote:
> > Hi Georg,
> >
> > It is not possible currently to compile with gcc 4.6 in C++11 mode
> > because lyxalgo.h declares its own next() method. This is because the
> > code depends on __cplusplus >= 201103L, which is not true for this
> > version of the compiler.
> >
> > I would propose to replace this test with a test on whether c++11 mode
> > has been selected by configure. Then it would be our responsibility to
> > forbid if needed C++11 mode in too old compilers.
> >
> > The alternative would be to actually check whether the compiler supports
> > std::next().
> >
> > JMarc
> >
> >    CXX    CutAndPaste.o
> > ../../master/src/CutAndPaste.cpp: In function
> > ‘lyx::{anonymous}::PasteReturnValue
> > lyx::{anonymous}::pasteSelectionHelper(const lyx::DocIterator&, const
> > lyx::ParagraphList&, lyx::DocumentClassConstPtr, lyx::Buffer*,
> > lyx::ErrorList&)’:
> > ../../master/src/CutAndPaste.cpp:390:37: erreur: call of overloaded
> > ‘next(lyx::RandomAccessList<lyx::Paragraph>::iterator, lyx::pit_type&)’
> > is ambiguous
> > ../../master/src/CutAndPaste.cpp:390:37: note: candidates are:
> > ../../master/src/support/lyxalgo.h:92:11: note: It lyx::next(It, Diff)
> > [with It =
> > __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<lyx::Paragraph>,
> > std::__debug::list<lyx::Paragraph, std::allocator<lyx::Paragraph> > >,
> > Diff = long int]
> > /usr/include/c++/4.6/bits/stl_iterator_base_funcs.h:182:5: note:
> > _ForwardIterator std::next(_ForwardIterator, typename
> > std::iterator_traits<_Iter>::difference_type) [with _ForwardIterator =
> > __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<lyx::Paragraph>,
> > std::__debug::list<lyx::Paragraph, std::allocator<lyx::Paragraph> > >,
> > typename std::iterator_traits<_Iter>::difference_type = long int]
> >
> 
> Starting with commit b596330 lyx fails to compile with cmake/xcode.
> This seems to be due to "boost::next" having been replaced by "next" and 
> this generates "ambiguous call to 'next'" semantic issues, one of the 2 
> possibilities being the "next" in lyxalgo.h mentioned in this message.
> So this might be related to this;
> I expected LYX_USE_CXX11 to be set (with the later commits that is), but 
> that's not the case;
> When I manually define LYX_USE_CXX11 the problems with "next" go away, 
> but similar and much more semantic issues surface with "bind".
> 
> Patrick
> 

This variable is set in config.h (in the build directory). It should be written 
there
in the configuration phase (while calling 'cmake').

        #egrep #define LYX_USE_CXX11 config.h
-->             #define LYX_USE_CXX11 1

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to