Le 07/06/2016 à 09:04, Jean-Marc Lasgouttes a écrit :
Le 05/06/2016 01:01, Guillaume Munch a écrit :
12. This is a new helper class that I wrote because the Changer class
from MetricsInfo was too cumbersome (essentially a TeX \def with
shadowing). This commit entirely replaces the latter with a better
alternative. While I am not sure that the Changer mechanism itself is
the best practice, this is the best solution in the context it is used,
given the current architecture of painting (I have found uses outside of
painting as well too). Since this is used in all the metrics and
painting mechanism, comments are kindly requested before committing.

I would not pretend that I understand everything here, but having a
general Changer system is something I have been wanting to do for some
time. I think this is OK.

Now that I tried to compile, I can see clang complain:

My old clang 3.0 dies as follow, and clang 3.7 does approximately the same.

JMarc

  CXX    MetricsInfo.o
../../master/src/MetricsInfo.cpp:86:9: error: no viable conversion from
'RefChanger<lyx::MetricsBase>' (aka 'std::unique_ptr<lyx::RevertibleRef<lyx::MetricsBase>, std::default_delete<lyx::RevertibleRef<lyx::MetricsBase> > >') to 'Changer' (aka
      'unique_ptr<lyx::Revertible>')
        return rc;
               ^~
/usr/include/c++/4.6/bits/unique_ptr.h:136:17: note: candidate constructor not viable: no known
      conversion from 'RefChanger<lyx::MetricsBase>' (aka
      'std::unique_ptr<lyx::RevertibleRef<lyx::MetricsBase>,
std::default_delete<lyx::RevertibleRef<lyx::MetricsBase> > >') to 'nullptr_t' for 1st argument;
      constexpr unique_ptr(nullptr_t)
                ^
/usr/include/c++/4.6/bits/unique_ptr.h:142:7: note: candidate constructor not viable: no known
      conversion from 'RefChanger<lyx::MetricsBase>' (aka
      'std::unique_ptr<lyx::RevertibleRef<lyx::MetricsBase>,
      std::default_delete<lyx::RevertibleRef<lyx::MetricsBase> > >') to
'std::unique_ptr<lyx::Revertible, std::default_delete<lyx::Revertible> > &&' for 1st argument;
      unique_ptr(unique_ptr&& __u)
      ^


Reply via email to