diff options
author | 2014-08-28 20:34:37 +0100 | |
---|---|---|
committer | 2014-08-28 20:34:37 +0100 | |
commit | 2d8c07fb1d39165bd762bd191e51213dc7ac6415 (patch) | |
tree | 50c01c34014a5a22fe647f966eb91cfa5ab0e604 | |
parent | 1d1b45ea7e78152003c9ba9b873b4f4c9355c0ae (diff) | |
download | paludis-2d8c07fb1d39165bd762bd191e51213dc7ac6415.tar.gz paludis-2d8c07fb1d39165bd762bd191e51213dc7ac6415.tar.xz |
Fix assorted build failures with clang
../../../paludis/paludis/util/sequence-impl.hh:162:21: error: expected expression
_imp->list.sort<const C_ &>(c);
- just a missing "template"
../../paludis/paludis/util/visitor.hh:322:24: error: no viable overloaded '='
result = _unwrapped_visitor.visit(t);
[snip]
../../paludis/paludis/mask.cc:43:17: note: in instantiation of function template specialization 'paludis::DeclareAbstractAcceptMethods<paludis::Mask,
paludis::TypeListEntry<paludis::UserMask, paludis::TypeListEntry<paludis::UnacceptedMask, paludis::TypeListEntry<paludis::RepositoryMask,
paludis::TypeListEntry<paludis::UnsupportedMask, paludis::TypeListTail> > > > >::make_accept_returning<<lambda at
../../paludis/paludis/mask.cc:44:9>, <lambda at ../../paludis/paludis/mask.cc:45:9>, <lambda at ../../paludis/paludis/mask.cc:46:9>, <lambda at
../../paludis/paludis/mask.cc:47:9> >' requested here
return mask.make_accept_returning(
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4/bits/basic_string.h:543:7: note: candidate function not viable: 'this' argument has type
'const std::basic_string<char>', but method is not marked const
operator=(const basic_string& __str)
[snip]
- template argument inferred as const and then used for temporary
variable that gets assigned, so needs to be forced non-const
In file included from ../../../../paludis/paludis/repositories/e/e_choice_value.cc:24:
../../../../paludis/paludis/util/pool-impl.hh:171:23: error: call to function 'operator==' that is neither visible in the template definition nor
found by argument-dependent lookup
return _value == static_cast<const ConcretePoolKey<T_> &>(other)._value;
[snip]
../../../../paludis/paludis/repositories/e/e_choice_value.cc:147:10: note: 'operator==' should be declared prior to the call site or in namespace
'paludis::erepository'
bool operator== (const EChoiceValueParams & a, const EChoiceValueParams & b)
- see http://clang.llvm.org/compatibility.html#dep_lookup
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4/functional:1925:2: error: no matching function for call to object of type
'std::_Bind<std::_Mem_fn<void (paludis::resolver::Decider::*)(const std::shared_ptr<const paludis::resolver::Resolution> &, const
std::shared_ptr<const paludis::resolver::Constraint> &, const std::shared_ptr<const paludis::resolver::Decision> &) __attribute__((noreturn))
const> (paludis::resolver::Decider *, std::shared_ptr<paludis::resolver::Resolution>, std::shared_ptr<const paludis::resolver::Constraint>,
std::shared_ptr<paludis::resolver::Decision>)>'
(*_Base::_M_get_pointer(__functor))(
[snip]
../../../paludis/paludis/resolver/decider.cc:936:65: note: in instantiation of function template specialization 'std::function<void
()>::function<std::_Bind<std::_Mem_fn<void (paludis::resolver::Decider::*)(const std::shared_ptr<const paludis::resolver::Resolution> &, const
std::shared_ptr<const paludis::resolver::Constraint> &, const std::shared_ptr<const paludis::resolver::Decision> &) __attribute__((noreturn))
const> (paludis::resolver::Decider *, std::shared_ptr<paludis::resolver::Resolution>, std::shared_ptr<const paludis::resolver::Constraint>,
std::shared_ptr<paludis::resolver::Decision>)> >' requested here
resolution->decision()->accept(WrongDecisionVisitor(std::bind(
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4/functional:1211:2: note: candidate template ignored: substitution failure [with _Args = <>]: no
matching function for call to object of type 'std::_Mem_fn<void (paludis::resolver::Decider::*)(const std::shared_ptr<const
paludis::resolver::Resolution> &, const std::shared_ptr<const paludis::resolver::Constraint> &, const std::shared_ptr<const
paludis::resolver::Decision> &) __attribute__((noreturn)) const>'
operator()(_Args&&... __args)
[snip]
- not sure why it doesn't like this, but its nicer with the anonymous
function anyway
../../paludis/python/dep_spec.cc:1409:16: error: explicit instantiation of 'paludis::WrappedForwardIterator' must occur in namespace 'paludis'
template class WrappedForwardIterator<PythonCompositeDepSpec::ConstIteratorTag,
../../paludis/python/exception.cc:32:16: error: explicit instantiation of 'paludis::Singleton' must occur in namespace 'paludis'
template class Singleton<ExceptionRegister>;
../../paludis/ruby/paludis_ruby.cc:38:16: error: explicit instantiation of 'paludis::Singleton' must occur in namespace 'paludis'
template class Singleton<RegisterRubyClass>;
- self-explanatory
-rw-r--r-- | paludis/repositories/e/e_choice_value.cc | 27 | ||||
-rw-r--r-- | paludis/resolver/decider.cc | 3 | ||||
-rw-r--r-- | paludis/util/sequence-impl.hh | 2 | ||||
-rw-r--r-- | paludis/util/visitor.hh | 2 | ||||
-rw-r--r-- | python/dep_spec.cc | 7 | ||||
-rw-r--r-- | python/exception.cc | 5 | ||||
-rw-r--r-- | ruby/paludis_ruby.cc | 5 |
7 files changed, 31 insertions, 20 deletions
diff --git a/paludis/repositories/e/e_choice_value.cc b/paludis/repositories/e/e_choice_value.cc index 342e10daf..f1abf5b4d 100644 --- a/paludis/repositories/e/e_choice_value.cc +++ b/paludis/repositories/e/e_choice_value.cc @@ -144,19 +144,22 @@ namespace paludis } }; - bool operator== (const EChoiceValueParams & a, const EChoiceValueParams & b) + namespace erepository { - return true - && (a.choice_name_with_prefix() == b.choice_name_with_prefix()) - && (a.choice_prefix_name() == b.choice_prefix_name()) - && (a.description() == b.description()) - && (a.enabled() == b.enabled()) - && (a.enabled_by_default() == b.enabled_by_default()) - && (a.origin() == b.origin()) - && (a.locked() == b.locked()) - && (a.presumed() == b.presumed()) - && (a.unprefixed_choice_name() == b.unprefixed_choice_name()) - ; + bool operator== (const EChoiceValueParams & a, const EChoiceValueParams & b) + { + return true + && (a.choice_name_with_prefix() == b.choice_name_with_prefix()) + && (a.choice_prefix_name() == b.choice_prefix_name()) + && (a.description() == b.description()) + && (a.enabled() == b.enabled()) + && (a.enabled_by_default() == b.enabled_by_default()) + && (a.origin() == b.origin()) + && (a.locked() == b.locked()) + && (a.presumed() == b.presumed()) + && (a.unprefixed_choice_name() == b.unprefixed_choice_name()) + ; + } } } diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc index f2a7f115f..010139801 100644 --- a/paludis/resolver/decider.cc +++ b/paludis/resolver/decider.cc @@ -933,8 +933,7 @@ Decider::_made_wrong_decision( adapted_resolution, _imp->fns.allow_choice_changes_fn()(resolution), false, true, false, true)); if (decision) { - resolution->decision()->accept(WrongDecisionVisitor(std::bind( - &Decider::_suggest_restart_with, this, resolution, constraint, decision))); + resolution->decision()->accept(WrongDecisionVisitor([&] () { _suggest_restart_with(resolution, constraint, decision); })); resolution->decision() = decision; } else diff --git a/paludis/util/sequence-impl.hh b/paludis/util/sequence-impl.hh index f1ae381ac..b8b130155 100644 --- a/paludis/util/sequence-impl.hh +++ b/paludis/util/sequence-impl.hh @@ -159,7 +159,7 @@ template <typename C_> void paludis::Sequence<T_>::sort(const C_ & c) { - _imp->list.sort<const C_ &>(c); + _imp->list.template sort<const C_ &>(c); } #endif diff --git a/paludis/util/visitor.hh b/paludis/util/visitor.hh index 19b3d0b6b..a49776e8e 100644 --- a/paludis/util/visitor.hh +++ b/paludis/util/visitor.hh @@ -135,7 +135,7 @@ namespace paludis }; template <typename T_> - using CallResultType = typename ExtractResultType<decltype(&T_::operator())>::Type; + using CallResultType = typename std::remove_const<typename ExtractResultType<decltype(&T_::operator())>::Type>::type; template <typename Revisitor_, typename Result_, typename... Cases_> struct MadeVisitor; diff --git a/python/dep_spec.cc b/python/dep_spec.cc index 2bee02bf0..26cfa030d 100644 --- a/python/dep_spec.cc +++ b/python/dep_spec.cc @@ -1406,6 +1406,9 @@ void expose_dep_spec() ; } -template class WrappedForwardIterator<PythonCompositeDepSpec::ConstIteratorTag, - const std::shared_ptr<const PythonDepSpec> >; +namespace paludis +{ + template class WrappedForwardIterator<PythonCompositeDepSpec::ConstIteratorTag, + const std::shared_ptr<const PythonDepSpec> >; +} diff --git a/python/exception.cc b/python/exception.cc index bf4fd190e..b796348c1 100644 --- a/python/exception.cc +++ b/python/exception.cc @@ -29,7 +29,10 @@ using namespace paludis; using namespace paludis::python; namespace bp = boost::python; -template class Singleton<ExceptionRegister>; +namespace paludis +{ + template class Singleton<ExceptionRegister>; +} RegisteredExceptionBase::~RegisteredExceptionBase() { diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc index d58a8d07e..4cb575a4f 100644 --- a/ruby/paludis_ruby.cc +++ b/ruby/paludis_ruby.cc @@ -35,7 +35,10 @@ using namespace paludis; using namespace paludis::ruby; -template class Singleton<RegisterRubyClass>; +namespace paludis +{ + template class Singleton<RegisterRubyClass>; +} namespace paludis { |