J
Julien Jorge
Hi,
I have a compilation-time error on the specialization of a method from a imbricated template class, and I can't figure why. The problematic part of the code is resumed below. The error occurs with g++ 4.1.1 but not with g++ 4..0.3. Do you see where the error is ?
header file :
//---------------------------------------------
namespace claw
{
namespace graphic
{
class bitmap
{
public:
class reader
{
private:
template<bool Coded4Bits>
class rle_bitmap_output_buffer
{
public:
void fill( unsigned int n, unsigned char pattern );
}; // class rle_bitmap_output_buffer
}; // class reader
}; // class bitmap
} // namespace graphic
} // namespace claw
//----------------------------------------------
implementation (.cpp):
//----------------------------------------------
template<>
void claw::graphic::bitmap::reader::rle_bitmap_output_buffer<false>::fill
( unsigned int n, unsigned char pattern )
{
// some content
}
//----------------------------------------------
The returned error is (in spanish):
error:
especialización de 'void claw::graphic::bitmap::reader::rle_bitmap_output_buffer<Coded4bits>::fill(unsigned
int, unsigned char) [with bool Coded4bits = false]' en un espacio de nombres diferente de la definición de 'void claw::graphic::bitmap::reader::rle_bitmap_output_buffer<Coded4bits>::fill(unsigned
int, unsigned char) [with bool Coded4bits = false]'
If my translation is correct, the compiler tells that the method is specialized in a namespace differing from the one used for its declaration. I can't figure where the problem is.
Thanks
--
Julien Jorge
Doctorant
LINA - Laboratoire d'Informatique de Nantes Atlantique
FRE CNRS 2729
Universite de Nantes
2, rue de la Houssiniere BP 92208
F-44322 Nantes Cedex 03 - FRANCE
Tél : 02.51.12.59.66
I have a compilation-time error on the specialization of a method from a imbricated template class, and I can't figure why. The problematic part of the code is resumed below. The error occurs with g++ 4.1.1 but not with g++ 4..0.3. Do you see where the error is ?
header file :
//---------------------------------------------
namespace claw
{
namespace graphic
{
class bitmap
{
public:
class reader
{
private:
template<bool Coded4Bits>
class rle_bitmap_output_buffer
{
public:
void fill( unsigned int n, unsigned char pattern );
}; // class rle_bitmap_output_buffer
}; // class reader
}; // class bitmap
} // namespace graphic
} // namespace claw
//----------------------------------------------
implementation (.cpp):
//----------------------------------------------
template<>
void claw::graphic::bitmap::reader::rle_bitmap_output_buffer<false>::fill
( unsigned int n, unsigned char pattern )
{
// some content
}
//----------------------------------------------
The returned error is (in spanish):
error:
especialización de 'void claw::graphic::bitmap::reader::rle_bitmap_output_buffer<Coded4bits>::fill(unsigned
int, unsigned char) [with bool Coded4bits = false]' en un espacio de nombres diferente de la definición de 'void claw::graphic::bitmap::reader::rle_bitmap_output_buffer<Coded4bits>::fill(unsigned
int, unsigned char) [with bool Coded4bits = false]'
If my translation is correct, the compiler tells that the method is specialized in a namespace differing from the one used for its declaration. I can't figure where the problem is.
Thanks
--
Julien Jorge
Doctorant
LINA - Laboratoire d'Informatique de Nantes Atlantique
FRE CNRS 2729
Universite de Nantes
2, rue de la Houssiniere BP 92208
F-44322 Nantes Cedex 03 - FRANCE
Tél : 02.51.12.59.66