Hello, I'm using MSVC6.0 with service-pack 6.0 installed. But I'm getting some weird problems. Consider the following simple program: ---------------------------------------------------- struct q { int x; }; int main() { int t; t = boost::is_POD< int >::value; // Ok, t = true; t = boost::is_POD< void >::value; // Ok?, t = true (is 'void' considered a POD?); t = boost::is_POD< q >::value; // Error, t = false } ---------------------------------------------------- Unless my definition of a POD type is incorrect, I think that q is considered POD, right? Am I doing something wrong here, or is the combination boost and msvc fatal once again? Just to be complete, I have the following defines in my main header: #define BOOST_NO_FUNCTION_PTR_TEMPLATE_PARAMETERS #define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION Thanks in advance, Jaap Suter
I'm using MSVC6.0 with service-pack 6.0 installed. But I'm getting some weird problems.
Consider the following simple program:
---------------------------------------------------- struct q { int x; };
int main() { int t; t = boost::is_POD< int >::value; // Ok, t = true; t = boost::is_POD< void >::value; // Ok?, t = true (is 'void' considered a POD?); t = boost::is_POD< q >::value; // Error, t = false } ----------------------------------------------------
Unless my definition of a POD type is incorrect, I think that q is considered POD, right?
Am I doing something wrong here, or is the combination boost and msvc fatal once again?
No, there is no way within the current language that is_POD can deduce that q is a POD. Hopefully the next version of the standard will address this, but until then about the only option is to provide a specialisation of is_POD for known non-trivial POD types. John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (2)
-
John Maddock
-
s9801758