Hi, I heard from someone that when building a shared library (DLL file), the compiler will not do the same processing of MPL code that it would do for an EXE. For example: struct Foo { static const float val = 1.5f; }; When exporting the 'Foo' class to a shared library, what will become of the 'val' member? Is just the number "1.5f" written out or what? I've given a very simple example, but the more complex example expands into the boost::mpl library, which follows the same concepts.
Hello Robert,
do you mean this issue: http://support.microsoft.com/kb/168958
Best Regards,
Ovanes
On 11/27/07, Robert Dailey
Hi,
I heard from someone that when building a shared library (DLL file), the compiler will not do the same processing of MPL code that it would do for an EXE. For example:
struct Foo { static const float val = 1.5f; };
When exporting the 'Foo' class to a shared library, what will become of the 'val' member? Is just the number "1.5f" written out or what? I've given a very simple example, but the more complex example expands into the boost::mpl library, which follows the same concepts.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
on Tue Nov 27 2007, "Robert Dailey"
Hi,
I heard from someone that when building a shared library (DLL file), the compiler will not do the same processing of MPL code that it would do for an EXE. For example:
struct Foo { static const float val = 1.5f; };
When exporting the 'Foo' class to a shared library, what will become of the 'val' member?
I'm pretty certain that code is illegal. AFAIK only integral constants can be initialized inside the class body.
Is just the number "1.5f" written out or what? I've given a very simple example, but the more complex example expands into the boost::mpl library, which follows the same concepts.
This example really has nothing to do with MPL, since initialization of floats is not a compile-time operation in C++. Maybe you could be more specific about what you're trying to do? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (3)
-
David Abrahams
-
Ovanes Markarian
-
Robert Dailey