mirror of
https://github.com/boostorg/dll.git
synced 2026-07-21 13:13:30 +00:00
Avoid dynamic initialization of plugin variable in tutorial1 (#113)
This commit is contained in:
@@ -16,9 +16,7 @@ namespace my_namespace {
|
||||
|
||||
class my_plugin_sum final: public my_plugin_api {
|
||||
public:
|
||||
my_plugin_sum() {
|
||||
std::cout << "Constructing my_plugin_sum" << std::endl;
|
||||
}
|
||||
my_plugin_sum() = default;
|
||||
|
||||
std::string name() const override {
|
||||
return "sum";
|
||||
@@ -35,7 +33,7 @@ public:
|
||||
|
||||
// Exporting `my_namespace::plugin` variable with name `plugin`
|
||||
extern "C" BOOST_SYMBOL_EXPORT my_plugin_sum plugin;
|
||||
my_plugin_sum plugin;
|
||||
/*constinit*/ my_plugin_sum plugin;
|
||||
|
||||
} // namespace my_namespace
|
||||
|
||||
|
||||
+5
-4
@@ -68,10 +68,11 @@ environment:
|
||||
# ADDPATH: C:\mingw\bin;
|
||||
# TOOLSET: gcc
|
||||
# CXXSTD: 11,14,1z
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ADDPATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;
|
||||
TOOLSET: gcc
|
||||
CXXSTD: 11,14,1z
|
||||
# Not supported by Boost.Atomic any more: `cannot find -lsynchronization`
|
||||
#- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
# ADDPATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;
|
||||
# TOOLSET: gcc
|
||||
# CXXSTD: 11,14,1z
|
||||
|
||||
before_build:
|
||||
- set BOOST_BRANCH=develop
|
||||
|
||||
Reference in New Issue
Block a user