compile error for boost::date_time::days_until_weekday
<p>I'm currently toying around with <code>boost::date_time</code>. While doing so, I came upon the <code>days_until_weekday</code> (<a href="http://www.boost.org/doc/libs/1_60_0/doc/html/date_time/gregorian.html#algo_func_overview" rel="nofollow">documentation link</a>) function which appears highly useful to me. Unfortunately, I get a compile time error from the following snippet</p>

<pre><code>date f(date d){
    return next_weekday(d,  boost::date_time::weekdays::Friday);
}
</code></pre>

<p>reading</p>

<pre><code>&gt; In file included from
&gt; /usr/include/boost/date_time/gregorian/gregorian_types.hpp:25:0,
&gt;                  from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:18,
&gt;                  from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
&gt;                  from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
&gt;                  from /usr/include/boost/date_time/posix_time/posix_time.hpp:15,
&gt;                  from prog.cpp:3: /usr/include/boost/date_time/date_generators.hpp: In instantiation of
&gt; 'typename date_type::duration_type
&gt; boost::date_time::days_until_weekday(const date_type&amp;, const
&gt; weekday_type&amp;) [with date_type = boost::gregorian::date; weekday_type
&gt; = boost::date_time::weekdays; typename date_type::duration_type = boost::gregorian::date_duration]':
&gt; /usr/include/boost/date_time/date_generators.hpp:488:34:   required
&gt; from 'date_type boost::date_time::next_weekday(const date_type&amp;, const
&gt; weekday_type&amp;) [with date_type = boost::gregorian::date; weekday_type
&gt; = boost::date_time::weekdays]' prog.cpp:11:67:   required from here /usr/include/boost/date_time/date_generators.hpp:452:37: error:
&gt; request for member 'as_number' in 'wd', which is of non-class type
&gt; 'const boost::date_time::weekdays'
&gt;      duration_type dd(wd.as_number() - d.day_of_week().as_number());
</code></pre>

<p>Go <a href="http://ideone.com/19eY0x" rel="nofollow">here</a> for a paste of my code.</p>

<p>As the snippet causing the error is so short, I'm really out of ideas to fix this.</p>

<p>By the way, I'm on boost 1.60.0 using clang 3.7.0.</p>