Browse Source

yay, template<> template<> does the trick! awesome syntax.

master
roker 5 months ago
parent
commit
7f7198fb21
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      src/types.cc
  2. +1
    -1
      src/wrapper.hh

+ 2
- 1
src/types.cc View File

@ -15,7 +15,8 @@ namespace pEp
template class Wrapper<::message>;
template<>
message* Wrapper<::message>::_new(PEP_msg_direction dir, char* s)
template<>
message* Wrapper<::message*>::_new<PEP_msg_direction, char*>(PEP_msg_direction dir, char* s)
{
message* m = new_message(dir);
return m;


+ 1
- 1
src/wrapper.hh View File

@ -29,7 +29,7 @@ public:
private:
// must be defined for each wrapped type:
template<class... Args>
T* _new(Args...);
T _new(Args...);
T value;
};


Loading…
Cancel
Save