Hi Jeremy,
--- Jeremy Siek
Hi Igor,
What about concepts defined within a doubly nested namespace? Will that also work?
You're right. There is a problem in my solution caused
by using 'ns' macro parameter in constructing names.
So, we could sacrifice the uniqueness of names to
usability.
The fixed solution looks like following:
[code
#define BOOST_CLASS_REQUIRES(type_var, ns, concept) \
typedef void (ns::concept
Have you tested the code below with VC++?
Yes, I tested it with VC++, SP5.
Actually, VC++ is very freakish in concern to
templates.
Let me give an example that expose one of the strange
behaviours of VC++ that couldn't be understood from
the point of view of common sense:
[code
template <class TT>
class A
{
public:
void foo() {}
};
template
On Tue, 20 Aug 2002, igor_bashkirov wrote: igor_b> igor_b> [code igor_b> igor_b> #define BOOST_CLASS_REQUIRES(type_var, ns, concept) \ igor_b> typedef void (ns::concept
::* func##type_var##ns##concept) igor_b> (); \ igor_b> template \ igor_b> struct concept_checking_##type_var##ns##concept { }; \ igor_b> typedef concept_checking_##type_var##ns##concept< \ igor_b> BOOST_FPTR ns::concept ::constraints> \ igor_b> concept_checking_typedef_##type_var##ns##concept; igor_b> igor_b> end code]
----------------------------------------------------------------------
Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------
__________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com