mirror of
https://github.com/boostorg/openmethod.git
synced 2026-01-19 04:22:12 +00:00
do not put initialize in aliases
This commit is contained in:
@@ -41,7 +41,7 @@ int main() {
|
||||
// end::unload[]
|
||||
std::cout << "Before loading the shared library.\n";
|
||||
|
||||
initialize();
|
||||
boost::openmethod::initialize();
|
||||
|
||||
std::cout << "cow meets wolf -> "
|
||||
<< meet(*std::make_unique<Cow>(), *std::make_unique<Wolf>())
|
||||
@@ -60,7 +60,7 @@ int main() {
|
||||
boost::dll::shared_library lib(
|
||||
boost::dll::program_location().parent_path() / LIBRARY_NAME,
|
||||
boost::dll::load_mode::rtld_now);
|
||||
initialize();
|
||||
boost::openmethod::initialize();
|
||||
|
||||
std::cout << "cow meets wolf -> "
|
||||
<< meet(*std::make_unique<Cow>(), *std::make_unique<Wolf>())
|
||||
@@ -83,7 +83,7 @@ int main() {
|
||||
std::cout << "\nAfter unloading the shared library.\n";
|
||||
|
||||
lib.unload();
|
||||
initialize();
|
||||
boost::openmethod::initialize();
|
||||
|
||||
std::cout << "cow meets wolf -> "
|
||||
<< meet(*std::make_unique<Cow>(), *std::make_unique<Wolf>())
|
||||
|
||||
@@ -37,7 +37,7 @@ auto main() -> int {
|
||||
using namespace boost::openmethod::aliases;
|
||||
|
||||
std::cout << "Before loading the shared library.\n";
|
||||
initialize();
|
||||
boost::openmethod::initialize();
|
||||
|
||||
auto gracie = make_unique_virtual<Cow>();
|
||||
auto willy = make_unique_virtual<Wolf>();
|
||||
@@ -53,7 +53,7 @@ auto main() -> int {
|
||||
boost::dll::program_location().parent_path() / LIBRARY_NAME,
|
||||
boost::dll::load_mode::rtld_now);
|
||||
|
||||
initialize();
|
||||
boost::openmethod::initialize();
|
||||
|
||||
std::cout << "cow meets wolf -> " << meet(*gracie, *willy) << "\n"; // run
|
||||
std::cout << "wolf meets cow -> " << meet(*willy, *gracie) << "\n"; // hunt
|
||||
|
||||
@@ -30,7 +30,7 @@ auto make_tiger() -> Animal*;
|
||||
}
|
||||
|
||||
auto main() -> int {
|
||||
initialize();
|
||||
boost::openmethod::initialize();
|
||||
|
||||
std::unique_ptr<Animal> gracie(new Cow());
|
||||
std::unique_ptr<Animal> willy(new Wolf());
|
||||
|
||||
@@ -1675,10 +1675,6 @@ inline auto finalize(Options&&... opts) -> void {
|
||||
Registry::finalize(std::forward<Options>(opts)...);
|
||||
}
|
||||
|
||||
namespace aliases {
|
||||
using boost::openmethod::initialize;
|
||||
}
|
||||
|
||||
} // namespace boost::openmethod
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
Reference in New Issue
Block a user