Skip to content

Releases: Woon-2/cpp-smart-pointer-type-trait

version 2.0

22 Dec 19:01
dd94812
Compare
Choose a tag to compare

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.

version 1.0

21 Dec 13:45
Compare
Choose a tag to compare

smart_pointer_type_trait.hpp is the header file.

  • example.cpp presents how to use.
  • example2.cpp presents efficient code decoupling by smart pointer type traits.

smart-pointer-type-trait-version-1.0.zip