Skip to content

Commit ece8108

Browse files
committed
Prevent automatic instantiation of Concurrency::Details::_do_while()
1 parent 38bf3f3 commit ece8108

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Release/include/cpprest/astreambuf.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ namespace Concurrency
2626
{
2727
namespace details
2828
{
29-
template<bool B=true>
30-
pplx::task<bool> _do_while(std::function<pplx::task<bool>(void)> func)
29+
template<class F, class T = bool>
30+
pplx::task<T> _do_while(F func)
3131
{
32-
pplx::task<bool> first = func();
33-
return first.then([=](bool guard) -> pplx::task<bool> {
32+
pplx::task<T> first = func();
33+
return first.then([=](bool guard) -> pplx::task<T> {
3434
if (guard)
35-
return Concurrency::details::_do_while<B>(func);
35+
return Concurrency::details::_do_while<F,T>(func);
3636
else
3737
return first;
3838
});
@@ -1200,3 +1200,4 @@ namespace streams
12001200
};
12011201

12021202
}}
1203+

0 commit comments

Comments
 (0)