build: instantiate templates in declared namespace

This commit is contained in:
Danny Robson 2015-01-10 19:40:32 +11:00
parent 9401e7a8f7
commit 3d3c1a5f2f
4 changed files with 8 additions and 7 deletions

View File

@ -128,5 +128,6 @@ fixed<INT, FRAC>::operator /(integral_type val) const
{ return fixed<INT, FRAC>(m_value / val); }
template class fixed<16,16>;
template class fixed<32,32>;
//-----------------------------------------------------------------------------
template class util::fixed<16,16>;
template class util::fixed<32,32>;

5
io.cpp
View File

@ -112,8 +112,9 @@ util::write (const boost::filesystem::path &path, const T *data, size_t len) {
}
}
template void write<char> (const boost::filesystem::path&, const char*, size_t);
template void write<uint8_t> (const boost::filesystem::path&, const uint8_t*, size_t);
template void util::write<char> (const boost::filesystem::path&, const char*, size_t);
template void util::write<uint8_t> (const boost::filesystem::path&, const uint8_t*, size_t);
//----------------------------------------------------------------------------

View File

@ -87,7 +87,6 @@ namespace util {
#include <functional>
namespace std {
template <>
template <size_t S, typename T>
struct hash<util::point<S,T>> {
size_t operator() (const util::point<S,T> &p) const {

View File

@ -74,5 +74,5 @@ quaternion<T>::operator* (const quaternion<T> &rhs) const {
//-----------------------------------------------------------------------------
template struct quaternion<float>;
template struct quaternion<double>;
template struct util::quaternion<float>;
template struct util::quaternion<double>;