Opened 10 years ago

Closed 10 years ago

#6913 closed Bugs (wontfix)

[Proto] Avoid specialization of decltype-based result_of

Reported by: Michel Morin Owned by: Eric Niebler
Milestone: To Be Determined Component: proto
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

It would be nice to avoid specialization of result_of, when we use decltype-based result_of. (As for tr1_result_of, it should be specialized even when decltype-based result_of is enabled.)

A quick grep said the following file specializes result_of.

  • proto/generate.hpp

Change History (1)

comment:1 by Eric Niebler, 10 years ago

Resolution: wontfix
Status: newclosed

I know I asked you to file this bug. But when I went to make the change, I found I had left myself the following comment in the code:

// Specializations of boost::result_of and boost::tr1_result_of to eliminate
// some unnecessary template instantiations

The comment is correct. Although strictly unnecessary in a decltype world, the boost::result_of specializations do bring down the number of template instantiations, which speeds up compile times. The specializations aren't actually hurting anything, so I'm leaving them in. (Note also the specializations are for unary function invocations, so they were never there to address the nullary limitation of tr1::result_of. They are strictly to bring down TMP overhead.)

If you find a situation where the specializations are causing a problem, feel free to reopen this bug. Thanks.

Note: See TracTickets for help on using tickets.