Since I hate holding back merging to the release branch to the last minute
before the next release I would like to start doing this asap. Any idea when
this might be allowed again?
Regards Hartmut
---------------
http://boost-spirit.com
Hello,
A few months ago, I created an MPL extension type for representing real
numbers. The indented use is for compile-time generation of
floating-point constants, although it could also be used for MPL-based
graph algorithms, etc. The primary design requirement was that almost
any compiler would be able to completely inline the conversion to
floating-point (which means no functional recursion can be used), and I
think I've achieved that. The current implementation uses a modified
version of MPL's vector type (modified to add the conversion to floating
point, add "overloads", and to remove the typeof-based implementation
variant (which is incompatible with the floating-point conversion)).
I've posted the code to the Boost vault under the "Template
Metaprogramming" section; the file name is boost-mpl-cf-20100531.zip
Continued fractions were chosen for the representation because the
associated algorithms are simple, and simple proved important for
keeping down compilation times. Even so, the compilation times might be
too long for practical use. You can decrease the compilation time by
using a shorter maximum cf-length by defining BOOST_MPL_LIMIT_CF_SIZE to
be 10 instead of 20. The current default is 20 to allow an effective
precision near that of a double. Also, continued fractions, being "based
on" rational numbers, can exactly represent any rational (for example,
1/3) so the computations can be more accurate than those using a
floating-point representation.
If you don't know what a continued fraction is, and would like to know,
you can check out the wikipedia page:
http://en.wikipedia.org/wiki/Continued_fraction
The current implementation supports addition, subtraction,
multiplication and division, comparison ops, some constants like pi, and
I've included sin()/cos() as well. I've not yet written any real
documentation, but the archive has a couple of test programs; the usage
is pretty simple. Each test program has many individual tests, so its
compilation time will be representative of a more-complicated
computation, if you just need to do a few things, it would be much
faster.
If there is interest, I'll add support for generating numbers using
metafunctions, write some documentation, jam files, etc. Let me know
what you think, and I welcome suggestions, criticisms, etc. Also, I've
currently tested using only the GNU and Intel compilers, so let me know
whether it does or does not work when using something else.
Thanks again,
Hal
P.S. I know that there is a mpl_math archive on the vault from back in
2007. I did not discover this until after I had almost finished writing
my mpl-cf implementation, but, the mailing-list messages from the time
indicate that it was too slow to be used practically, since I think the
continued fractions algorithms are simpler, mpl-cf might be better, but
I've not tested it to find out.
There were 30 changes to the trac database yesterday.
[ I'd like to say "30 tickets were changed", but some tickets were changed more than once. ]
That's a notable decrease in activity from the last few days.
In the last bug sprint, we closed almost 100 tickets. So far this time, we've closed 17.
If you think it's too late to get involved - you're wrong!
A couple of notes:
1) Please log into the Trac system before you add/modify a ticket. "Anonymous said:" is hard to follow up.
2) It is perfectly OK to add a comment to a ticket that says "I tested this patch on my system (foo, gcc 1.2.3.4, etc) and it worked fine/didn't work/etc"
General information about the bug sprint is here: https://svn.boost.org/trac/boost/wiki/BugSprintNov2010
General information about how the Trac system works is here: https://svn.boost.org/trac/boost/wiki/TicketWorkflow
Overall bug count:
November 26: 946
November 27: 939
November 28: 930
November 29: 934 (whoops, that's the wrong direction!)
November 30: 931 (better, but the delta is too small)
December 1: 929
Activities on the trac system yesterday:
avibahra@ 3
marshall 3
hkaiser 3
jwellico 3
--others-- 18
Useful reports:
https://svn.boost.org/trac/boost/report/1 -- full list of tickets
https://svn.boost.org/trac/boost/report/18 -- ticket counts by owner
https://svn.boost.org/trac/boost/report/19 -- ticket counts by component
https://svn.boost.org/trac/boost/report/20 -- ticket counts by ticket type
https://svn.boost.org/trac/boost/report/21 -- ticket counts by milestone
Hello,
I found adding the following conversion operator to Boost.Any was very
helpful in some cases: (specially when using macros inside functions)
template <typename ValueType>
operator ValueType()
{
return any_cast<ValueType>(*this);
}
(bringing in boost dev...)
This sounds bad. Can anybody confirm?
--
Eric Niebler
BoostPro Computing
http://www.boostpro.com
On 11/19/2010 4:35 PM, gast128 wrote:
> Hello all,
>
> just tried out Boost 1.45 on VStudio 2003 but I got a compile error by only
> including type_traits:
>
> #include <boost/type_traits.hpp>
>
> int main()
> {
> return 0;
> }
>
> C:\Work Sdk\boost_1_45_0\boost\typeof\msvc\typeof_impl.hpp(160) : error C2027:
> use of undefined type '<Unknown>'
> C:\Work Sdk\boost_1_45_0\boost\typeof\msvc\typeof_impl.hpp(143) : see
> declaration of '<Unknown>'
> C:\Work Sdk\boost_1_45_0\boost\typeof\msvc\typeof_impl.hpp(160) : see
> reference to class template instantiation '<Unknown>' being compiled
> C:\Work Sdk\boost_1_45_0\boost\type_traits\common_type.hpp(121) : see
> reference to class template instantiation '<Unknown>' being compiled
> C:\Work Sdk\boost_1_45_0\boost\type_traits\common_type.hpp(123) : see
> reference to class template
> instantiation 'boost::type_traits_detail::common_type_2<T,U>' being compiled
> C:\Work Sdk\boost_1_45_0\boost\typeof\msvc\typeof_impl.hpp(160) : error C2146:
> syntax error : missing ';' before identifier 'wrapped_type'
> C:\Work Sdk\boost_1_45_0\boost\typeof\msvc\typeof_impl.hpp(160) : error
> C2501: '<Unknown>' : missing storage-class or type specifiers
> C:\Work Sdk\boost_1_45_0\boost\typeof\msvc\typeof_impl.hpp(161) : error
> C2653: 'wrapped_type' : is not a class or namespace name
>
> afaik it seems located on 121 in 'boost/type_traits/coomon_type.hpp'
>
> Anyone can help?