#include "Bitmap.h" #include <cstdlib> #include <cstring> namespace msdfgen { template <typename T, int N> Bitmap<T, N>::Bitmap() : … { … } template <typename T, int N> Bitmap<T, N>::Bitmap(int width, int height) : … { … } template <typename T, int N> Bitmap<T, N>::Bitmap(const BitmapConstRef<T, N> &orig) : … { … } template <typename T, int N> Bitmap<T, N>::Bitmap(const Bitmap<T, N> &orig) : … { … } #ifdef MSDFGEN_USE_CPP11 template <typename T, int N> Bitmap<T, N>::Bitmap(Bitmap<T, N> &&orig) : pixels(orig.pixels), w(orig.w), h(orig.h) { orig.pixels = NULL; orig.w = 0, orig.h = 0; } #endif template <typename T, int N> Bitmap<T, N>::~Bitmap() { … } template <typename T, int N> Bitmap<T, N> &Bitmap<T, N>::operator=(const BitmapConstRef<T, N> &orig) { … } template <typename T, int N> Bitmap<T, N> &Bitmap<T, N>::operator=(const Bitmap<T, N> &orig) { … } #ifdef MSDFGEN_USE_CPP11 template <typename T, int N> Bitmap<T, N> &Bitmap<T, N>::operator=(Bitmap<T, N> &&orig) { if (this != &orig) { delete [] pixels; pixels = orig.pixels; w = orig.w, h = orig.h; orig.pixels = NULL; } return *this; } #endif template <typename T, int N> int Bitmap<T, N>::width() const { … } template <typename T, int N> int Bitmap<T, N>::height() const { … } template <typename T, int N> T *Bitmap<T, N>::operator()(int x, int y) { … } template <typename T, int N> const T *Bitmap<T, N>::operator()(int x, int y) const { … } operator type-parameter-0-0 *() operator const type-parameter-0-0 *() operator BitmapRef<type-parameter-0-0, N>() operator BitmapConstRef<type-parameter-0-0, N>() }