[ 
https://issues.apache.org/jira/browse/MESOS-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vinod Kone reopened MESOS-1286:
-------------------------------


Reopned because it's causing build issues on some compilers.

{code}
In file included from ../../src/master/master.hpp:39:0,
                 from ../../src/master/hierarchical_allocator_process.hpp:36,
                 from ../../src/local/local.cpp:42:
../../3rdparty/libprocess/include/process/metrics/gauge.hpp: In constructor 
'process::metrics::Gauge::Data::Data(const std::tr1::function<double()>&)':
../../3rdparty/libprocess/include/process/metrics/gauge.hpp:48:48: error: no 
matching function for call to 'bind(<unresolved overloaded function type>, 
const std::tr1::function<double()>&, void*)'
../../3rdparty/libprocess/include/process/metrics/gauge.hpp:48:48: note: 
candidates are:
/usr/include/c++/4.6/tr1/functional:1372:5: note: template<class _Result, class 
_Functor, class ... _ArgTypes> std::tr1::_Bind_result<_Result, typename 
std::tr1::_Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes ...)> 
std::tr1::bind(_Functor, _ArgTypes ...)
/usr/include/c++/4.6/tr1/functional:1359:5: note: template<class _Functor, 
class ... _ArgTypes> std::tr1::_Bind<typename 
std::tr1::_Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes ...)> 
std::tr1::bind(_Functor, _ArgTypes ...)
In file included from ../../src/master/hierarchical_allocator_process.hpp:36:0,
                 from ../../src/local/local.cpp:42:
../../src/master/master.hpp: In constructor 
'mesos::internal::master::Master::Metrics::Metrics(const 
mesos::internal::master::Master&)':
../../src/master/master.hpp:497:36: error: call of overloaded 'Gauge(const char 
[24], process::_Defer<process::Future<double> 
(*(process::PID<mesos::internal::master::Master>, double 
(mesos::internal::master::Master::*)()))(const 
process::PID<mesos::internal::master::Master>&, double 
(mesos::internal::master::Master::*)())>)' is ambiguous
../../src/master/master.hpp:497:36: note: candidates are:
../../3rdparty/libprocess/include/process/metrics/gauge.hpp:32:3: note: 
process::metrics::Gauge::Gauge(const string&, const 
process::Deferred<process::Future<double>()>&)
../../3rdparty/libprocess/include/process/metrics/gauge.hpp:27:3: note: 
process::metrics::Gauge::Gauge(const string&, const 
std::tr1::function<double()>&)
{code}

Reverting the commit to unbreak the master.

commit 611e1c2314d34bdf5982e16b416a682934020ca1
Author: Vinod Kone <[email protected]>
Date:   Tue May 13 10:28:47 2014 -0700

    Revert "Allowed Gauge to take synchronous functions."
    
    Bug: MESOS-1286
    
    This reverts commit 249011b3d71fcc1776104132391c2011335788d5.



> metrics Gauge doesn't need to depend on defer
> ---------------------------------------------
>
>                 Key: MESOS-1286
>                 URL: https://issues.apache.org/jira/browse/MESOS-1286
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Dominic Hamon
>            Assignee: Dominic Hamon
>             Fix For: 0.19.0
>
>
> metrics::Gauge currently requires defer.hpp which is unnecessary. In fact, 
> switching the API to take a std::function still allows deferred objects to be 
> passed in, but also allows for synchronous gauges for simple cases.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to