#2749 closed Library Submissions (wontfix)
[any] multi method for boost::any and modified boost::any to fit multi method
Reported by: | Owned by: | nasonov | |
---|---|---|---|
Milestone: | Boost 1.39.0 | Component: | any |
Version: | Boost 1.38.0 | Severity: | Optimization |
Keywords: | any multimethod dispatcher | Cc: |
Description
I tried to implement multimethod using Modern C++ Design's multi method technique.
Multimethod.hpp::
Multi method for boost::any. To specialize MultiMethod::Traits template, you can fit your boost::any like classes (check Holder.hpp). This class necessary loki/LokiTypeInfo.h and is_call_possible.
And you must "entry" multi method before using multi methods. (same as Modern C++ Design's multi methods)
Holder.hpp::
Costomized boost::any for multi method. This class set unsigned int every class type to access multi method in constant time, and this class can also use multimethod holder.
Please see attached main.cpp to check samples.
Attachments (7)
Change History (9)
by , 14 years ago
Attachment: | Multimethod.hpp added |
---|
by , 14 years ago
Attachment: | MemberFunctionChecker.hpp added |
---|
by , 14 years ago
Attachment: | Multimethod.2.hpp added |
---|
Multi method for boost::any (update: dispatch in constant-time using boost::unorderd_map)
by , 14 years ago
Attachment: | Multimethod.3.hpp added |
---|
Update MultiMethod to enhance flexibility of return value.
comment:1 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Sandbox is a better place for this ticket.
Multi method for boost::any