Hi!
On Mon, Sep 28, 2015 at 12:56:43PM +0200, Tim Janik wrote:
> On 22.09.2015 17:12, Tim Janik wrote:
> > Hey Stefan,
> >
> > I've taken a look at the g++4-.8 build error on Ubuntu-14.04 you reported.
> > Turns out I don't need a 14.04 docker containe rto reproduce this, my
> > Ubuntu-15.04
> > also ships g++-4.8.real (Ubuntu 4.8.4-1ubuntu15) 4.8.4.
> >
> > It looks like g++-4.8 has problems with C++11 "delegate constructors", even
> > though g++-4.7
> > should already have gotten full support:
> > https://gcc.gnu.org/projects/cxx0x.html
> >
> > Attached is a stupid workaround that compiles rcore/aida.cc.
>
> Hm, bad news here.
> G++-4.9 chokes on the workaround for g++-4.8, so I cannot apply a fix like
> this to master.
> I don't currently have an idea what approach would work for both compiler
> versions, suggestions welcome...
>
> CXX aida.lo
> In file included from aida.cc:2:0:
> aida.hh: In instantiation of 'Rapicorn1509::Aida::Any::Any(V&&) [with V =
> Rapicorn1509::Aida::Fix1; typename std::enable_if<(!
> std::is_base_of<Rapicorn1509::Aida::Any, typename std::remove_reference<
> <template-parameter-1-1> >::type>::value), bool>::type <anonymous> = 1u]':
> aida.cc:325:14: required from here
> aida.hh:285:41: error: constructor delegates to itself
>
> 284ff:
> /// Initialize Any and set its contents from @a value.
>
> template<class V, REQUIRES< !::std::is_base_of< Any, typename
> std::remove_reference<V>::type >::value > = true> inline
> explicit Any (V &&value) : Any (Fix1()) { set (::std::forward<V>
> (value)); }
Here is a patch that makes the rcore dir compile on both: kubuntu14.04 and
15.04.
diff --git a/rcore/aida.hh b/rcore/aida.hh
index b77ca2f..20ad8a0 100644
--- a/rcore/aida.hh
+++ b/rcore/aida.hh
@@ -275,7 +275,8 @@ private:
void rekind (TypeKind _kind);
public:
/*dtor*/ ~Any (); ///< Any destructor.
- explicit Any (); ///< Default
initialize Any with no type.
+ /* FIXME: removed explicit keyword to compile under g++-4.8.4 */
+ /*ctor*/ Any (); ///< Default
initialize Any with no type.
/// Initialize Any from a @a anany which is of Any or derived type.
template<class V, REQUIRES< ::std::is_base_of< Any, typename
std::remove_reference<V>::type >::value > = true> inline
explicit Any (V &&anany) : Any() { this->operator= (::std::forward<V>
(anany)); }
This change doesn't need to stay in forever, only so long as we see that many
people rely on g++-4.8.
Cu... Stefan
--
Stefan Westerfeld, http://space.twc.de/~stefan
_______________________________________________
beast mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/beast