Skip to content

Commit

Permalink
remove noexcept because of msvc; more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Sep 24, 2024
1 parent f84a538 commit 26d5017
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 375 deletions.
10 changes: 5 additions & 5 deletions docs.in/reference/define_method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ struct Bulldog : Dog {};

register_classes(Animal, Dog, Bulldog);

declare_method(kick, (virtual_<Animal*>), std::string);
declare_method(kick, (virtual_<Animal&>), std::string);

define_method(kick, (Dog* dog), std::string) {
define_method(kick, (Dog& dog), std::string) {
return "bark";
}

define_method(kick, (Bulldog* dog), std::string) {
define_method(kick, (Bulldog& dog), std::string) {
return next(dog) + " and bite";
}

Expand All @@ -81,10 +81,10 @@ BOOST_AUTO_TEST_CASE(ref_example) {
Animal* animal;

animal = &snoopy;
BOOST_TEST(kick(animal) == "bark");
BOOST_TEST(kick(*animal) == "bark");

animal = &hector;
BOOST_TEST(kick(animal) == "bark and bite");
BOOST_TEST(kick(*animal) == "bark and bite");
}

#endif
2 changes: 0 additions & 2 deletions docs.in/reference/virtual_.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ struct Animal {
virtual ~Animal() {}
};

declare_method(kick, (virtual_<Animal*>), void);
declare_method(kick, (virtual_<Animal&>), void);
declare_method(kick, (virtual_<Animal&&>), void);
declare_method(kick, (virtual_<std::shared_ptr<Animal>>), void);
declare_method(kick, (virtual_<const std::shared_ptr<Animal>&>), void);
declare_method(kick, (virtual_<const Animal*>), void);
declare_method(kick, (virtual_<const Animal&>), void);
declare_method(kick, (virtual_<std::shared_ptr<const Animal>>), void);
declare_method(kick, (virtual_<const std::shared_ptr<const Animal>&>), void);
Expand Down
Loading

0 comments on commit 26d5017

Please sign in to comment.