mirror of
https://github.com/KjellKod/g3log.git
synced 2025-02-24 15:26:53 +01:00
Work around for bug in VS2013. Reported here: http://www.beta.microsoft.com/VisualStudio/feedback/details/757472/c-concurrency-task-and-std-bind
"auto" did not cut it apparently.
This commit is contained in:
parent
956da51317
commit
40a6e99bc0
@ -40,17 +40,18 @@ struct Sink : public SinkWrapper {
|
||||
|
||||
template<typename DefaultLogCall >
|
||||
Sink(std::unique_ptr<T> sink, DefaultLogCall call)
|
||||
: SinkWrapper (),
|
||||
: SinkWrapper{},
|
||||
_real_sink{std::move(sink)},
|
||||
_bg(kjellkod::Active::createActive()),
|
||||
_default_log_call(std::bind(call, _real_sink.get(), std::placeholders::_1)) {
|
||||
}
|
||||
|
||||
|
||||
Sink(std::unique_ptr<T> sink, void(T::*Call)(std::string) )
|
||||
: SinkWrapper(),
|
||||
: SinkWrapper{},
|
||||
_real_sink {std::move(sink)},
|
||||
_bg(kjellkod::Active::createActive()) {
|
||||
auto adapter = std::bind(Call, _real_sink.get(), std::placeholders::_1);
|
||||
std::function<void(std::string)> adapter = std::bind(Call, _real_sink.get(), std::placeholders::_1);
|
||||
_default_log_call = [ = ](LogMessageMover m){adapter(m.get().toString());};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user