invalid template argument for 'N', expected compile-time constant expression
===

I'm creating a high precision floating point library (for educational purpose) and the constructors are shown below.

The idea is to have a generic constructor (the first one) and then 2 specialized constructors for std::string and std::bitset.

The problem is that I keep getting: "error C2975: 'Float' : invalid template argument for 'N', expected compile-time constant expression" for both specialized constructors.

Can anyone tell me how to correct this?

Thanks in advance!

    template<typename T>
	Float(T n) {
		type_wrapper<T> data;
		data.in = n;
		bits = std::bitset<N>(data.out);
		_overflow = false;
	}

	template<>
	Float< const std::bitset<N> >(const std::bitset<N> bits) {
		this->bits = bits;
		_overflow = false;
	}

	template<>
	Float< const std::string& >(const std::string& s) {
		int n = std::min(N, s.length());
		for(int i = 0; i < n; i++) {
			bits[n-i-1] = (s.at(i) == '1' ? 1 : 0);
		}
		_overflow = false;
	}