Skip to content

version 2.0

Latest
Compare
Choose a tag to compare
@Woon-2 Woon-2 released this 22 Dec 19:01
dd94812

smart_pointer_type_trait.hpp is the only header file you need to include.

Example sources are contained.
example.cpp is the most intuitive tutorial.

smart pointer type trait.zip

Patch Note

  • is_ptr and is_ptr_v have been replaced with is_pointable, which is expanded to all pointable classes and raw pointers.
  • appended a guide for the creation of your own pointer class's type traits in smart_pointer_type_trait.hpp.
    • added an example for it. (example3 - new pointer class type traits.cpp)
      Following the guide, it implements the creation of new pointer class's type traits.
  • put the features in namespace woon2.
  • more precise implementation for example2 - decoupled pointer.cpp made.
    • testing other pointer type needs modifying no more than one line.