Showing posts tagged #C++ - Show all

Is this really what C++ templates were invented for?

December 15, 2011

/parser.cpp:17: error: request for member ‘begin’ in ‘myset’, which is of non-class type ‘std::set<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(std::istreambuf_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::char_traits<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::istreambuf_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::char_traits<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > (*)())’

·

I hate C++

September 17, 2009
Brain-fucking language inspiring to write such constructions should not live.
namespace boost { namespace fusion {

    struct random_access_traversal_tag;

    namespace result_of
    {
        template <typename Sequence, typename State, typename F>
        struct fold
            : fusion::detail::choose_fold<
            Sequence, State, F
            , is_base_of<random_access_traversal_tag, typename traits::category_of<Sequence>::type>::value>
        {};
    }
    
    template 
    inline typename result_of::fold::type
    fold(Sequence& seq, State const& state, F f)
...
·