Created
September 10, 2012 11:48
-
-
Save eiennohito/3690481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class xxx_serializer { | |
template<typename T> | |
void archive(T& obj) { serialize(obj); } //redirect | |
template<typename T> | |
void serialize(T& obj) { | |
xxx_serializer_impl<T> impl(&this); | |
impl.do_work(obj); | |
} | |
} | |
template<typename Arch, typename T> | |
void archive(Arch& arch, T& obj) { arch.archive(obj); } // default template implementation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment