[Bug c++/34624] templated code is rejected different type in nontype template argument
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 17:29:00 GMT 2008
------- Comment #10 from pinskia at gcc dot gnu dot org 2008-12-30 17:25 -------
Here is a reduced testcase which is rejected for both -m32 and -m64:
typedef unsigned long size_t;
template <typename t, size_t len> class array {};
typedef unsigned int uint;
template<typename sampletype, uint size>
struct my_table: array<sampletype, size> {};
template<typename sampletype, uint size>
inline const sampletype * get_samples(array<sampletype, size> const &buffer) {
}
int main()
{
my_table<float, 1024> tab;
const float * ptr = get_samples(tab);
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|valid c++ code doesn't |templated code is rejected
|compile for x86_64, but for |different type in nontype
|i386 |template argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34624
More information about the Gcc-bugs
mailing list