Thats part of my class.Code:template <typename OldType, typename NewType> any & ChangeType() { placeholder * newcontent = new holder<NewType>(reinterpret_cast<NewType>(any_cast<OldType>(*this))); std::swap(content,newcontent); delete newcontent; return *this; }
here's my main:
And it says that it doesn't expect the int...Code:#include <any.hpp> int main() { blah.ChangeType<int,char>(); }