Hi guys,
Funny problem with c++ encoding, only on OS/X. Works fine on any other OS.
Everything encodes fine except 'bool'.
#include "avro/Specific.hh"
#include "avro/Encoder.hh"
#include "avro/Decoder.hh"
struct ArrayOfBoolean{
std::vector<bool> m_values;
};
static void encode(avro::Encoder& e, const ArrayOfBoolean& v) {
avro::encode(e, v.m_values);
}
static void decode(avro::Decoder& e, ArrayOfBoolean& v) {
avro::decode(e, v.m_values);
}
int main(int argC, char ** argV)
{
return 0;
}
etp-cpp wsmckenz$ g++ test.cpp -I/usr/local/include -I/opt/local/include
In file included from test.cpp:8:
*/usr/local/include/avro/Specific.hh:297:22: **error: **no member named
'encode' in*
*
'avro::codec_traits<std::__1::__bit_const_reference<std::__1::vector<bool,*
* std::__1::allocator<bool> > > >'*
codec_traits<T>::encode(e, t);
* ~~~~~~~~~~~~~~~~~^*
*/usr/local/include/avro/Specific.hh:232:23: note: *in instantiation of
function
template specialization
'avro::encode<std::__1::__bit_const_reference<std::__1::vector<bool,
std::__1::allocator<bool> > > >' requested here
avro::encode(e, *it);
* ^*
*/usr/local/include/avro/Specific.hh:297:22: note: *in instantiation of
member
function 'avro::codec_traits<std::__1::vector<bool,
std::__1::allocator<bool> > >::encode' requested here
codec_traits<T>::encode(e, t);
* ^*
*test.cpp:17:8: note: *in instantiation of function template specialization
'avro::encode<std::__1::vector<bool, std::__1::allocator<bool> > >'
requested here
avro::encode(e, v.m_values);
* ^*
1 error generated.
any ideas?
cheers,
~Bill