You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a test for dynamic loading. The main program loads a shared library that exports the default registry, then a shared library that exports a method and adds it to the registry, then load a shared library that adds an overrider to the method. Check that all the static state is unique and the same for all libraries. The libraries export functions that make it possible for the main program to check that:
- the registry state is the same for all libraries (use `id()`)
- the policies that contain static state all use the same variables (again use `id()`).
- the method is the same in all libraries (check `&fn`).
On msvc, use `boost_openmethod_declspec` to import and export the variables as needed. Take inspiration from the example in `shared_libs`. Put the new test in `test/dynamic_loading`.
- 21+ test files covering dispatch, policies, virtual_ptr, RTTI, errors, etc.
78
79
79
80
### Debug Mode Features
@@ -165,35 +166,53 @@ Tests require these C++17 features (checked by Boost.Build):
165
166
**Overview**: The library supports shared library usage on Windows with proper dllexport/dllimport decoration.
166
167
167
168
**Key Pattern - Decoratable Static Variables**:
168
-
All policy static variables use `BOOST_OPENMETHOD_DETAIL_MAKE_SYMBOL_WITH_ATTRIBUTES(name)` macro to enable DLL decoration. This generates three specializations of `global_state_<name>`:
169
+
All policy static variables use `BOOST_OPENMETHOD_DETAIL_MAKE_STATICS(name)` macro (in `preamble.hpp`) to enable DLL decoration. This generates three specializations of `static_<name>`:
169
170
- Default (no attributes)
170
-
-`__declspec(dllexport)` when registry has dllexport attributes
171
-
-`__declspec(dllimport)` when registry has dllimport attributes
When `<typeinfo>` is unavailable or insufficient, use static_rtti or implement custom RTTI. See `doc/modules/ROOT/examples/custom_rtti/` and policies in `include/boost/openmethod/policies/`.
0 commit comments