|
Boost : |
From: Allen Yao (yaozhen_at_[hidden])
Date: 2004-12-01 00:32:40
I read the following from the documents:
===================================
The BOOST_TYPEOF_REGISTER_TEMPLATE_X macro accepts
a template name and a preprocessor sequence describing template
parameters, where each parameter should be described as one of the
following:
§ class
§ typename
§ [unsigned] char
§ [unsigned] short
§ [unsigned] int
§ [unsigned] long
§ unsigned
§ bool
For example:
BOOST_TYPEOF_REGISTER_TEMPLATE_X(foo, (class)(unsigned int)(bool));
===================================
I wonder if other non-type template parameter is supported. For example:
template <void (*)()>
struct template_with_func_ptr_param {};
BOOST_TYPEOF_REGISTER_TEMPLATE_X(
template_with_func_ptr_param,
(void (*)())
); // is this legal or possible?
template <void (MyClass::*)(int)>
struct template_with_mem_func_ptr_param {};
BOOST_TYPEOF_REGISTER_TEMPLATE_X(
template_with_mem_func_ptr_param,
(void (MyClass::*)(int))
); // is this legal or possible?
template <typename T, T t>
struct template_with_dependent_non_type_param {};
BOOST_TYPEOF_REGISTER_TEMPLATE_X(
template_with_dependent_non_type_param,
(class)(/* what to put here? */))
); // is this legal or possible?
I didn't look into the implementation of the library. If I am missing
something,
please don't hesitate to point it out.
Best regards,
Allen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk