Skip to content

johnny-yue/visitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

visitor pattern

In two different methods.

  1. Classical method.
  • The classical double dispatch implimentation. Requires two virtual function calls.
  1. Using lambda, std::visit and std::variant
  • Tested under a contrived example, it takes more time then a typical double dispatch. Possibly because the utility provided by std library has heavy internals.
  • One thing this method is better than the first method is that it does not require the visited to be under the same type hierarchy.

Compile / Run

mkdir bld

cd bld

cmake ..

make

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published