> On April 14, 2014, 11 a.m., Dominic Hamon wrote:
> > include/mesos/scheduler.hpp, line 455
> > <https://reviews.apache.org/r/20309/diff/1/?file=555864#file555864line455>
> >
> > please use lambda::function here to avoid more c++11-only code paths.
>
> Benjamin Hindman wrote:
> I can't use 'lambda' here as stout is not a "public" API.
Oh, that's a good point. Do you think it's worth having something in our public
API that uses macros to differentiate?
#if __cplusplus >= 201103
#define BEGIN_STD namespace std {
#define END_STD } // namespace std
#define STD std
#else
#define BEGIN_STD namespace std { namespace tr1 {
#define END_STD } } // namespace std::tr1
#define STD std::tr1
#endif
then
const STD::function<void ()> f;
It might cause issues in g++-4.6 (where __cplusplus is 201103 but some things
are still tr1) but no more than the current code. It also is easy to forget...
- Dominic
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20309/#review40279
-----------------------------------------------------------
On June 3, 2014, 12:52 p.m., Benjamin Hindman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20309/
> -----------------------------------------------------------
>
> (Updated June 3, 2014, 12:52 p.m.)
>
>
> Review request for mesos, Ben Mahler and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary. Note that in an incremental review I plan to implement Scheduler
> and SchedulerDriver on this API so that we can run all existing tests using
> this API. For now I've included at least one test as a demonstration.
>
>
> Diffs
> -----
>
> include/mesos/mesos.proto 82388e1ed5ee36aaf7fc31d7a59aa0923ee9ab46
> include/mesos/scheduler.hpp 85db1117122441b5d9fb013380ea37aa0acc84ea
> include/mesos/scheduler/scheduler.hpp PRE-CREATION
> include/mesos/scheduler/scheduler.proto PRE-CREATION
> src/Makefile.am ffde59be8683dd40cc5bc7cb88cd88c5bc91cf96
> src/sched/sched.cpp be23e012fba99363b72b749b110f12ce3c902014
> src/scheduler/scheduler.cpp PRE-CREATION
> src/tests/master_tests.cpp 7183cb7d567664a2f07b8d11980c8fbbec1711af
> src/tests/scheduler_tests.cpp bd3c22d5a500c6f9046afa5ff5185a4d86796c57
>
> Diff: https://reviews.apache.org/r/20309/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Benjamin Hindman
>
>