|
Boost Users : |
Subject: [Boost-users] [fusion] Compile Error using BOOST_FUSION_DEFINE_STRUCT_INLINE with VC10 and GCC 4.2.1
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2012-10-23 06:44:21
HI,
the following code gives a compile error on VC10 and GCC 4.2.1. Clang
and GCC 4.7 like it:
#include <boost/fusion/sequence.hpp>
#include <boost/fusion/include/define_struct_inline.hpp>
#include <iostream>
template<class T>
struct enclosing
{
BOOST_FUSION_DEFINE_STRUCT_INLINE(
employee,
(std::string, name)
(int, age))
};
int main()
{
enclosing<int>::employee e;
e.name="abc";
std::cout<<boost::fusion::deref(boost::fusion::begin(e));
}
complete error mssag on VC10:
1>c:\program files
(x86)\boost\boost_1_51\boost\fusion\iterator\deref.hpp(34): error C2504:
'enclosing<T>::employee::employee_iterator<boost_fusion_uglified_Seq,N>::deref<boost_fusion_uglified_T>':
Basisklasse undefiniert
1> with
1> [
1> T=int,
1> boost_fusion_uglified_Seq=enclosing<int>::employee,
1> N=0
1> ]
1> and
1> [
1>
boost_fusion_uglified_T=enclosing<int>::employee::employee_iterator<enclosing<int>::employee,0>
1> ]
1> c:\program files
(x86)\boost\boost_1_51\boost\fusion\iterator\deref.hpp(53): Siehe
Verweis auf die Instanziierung der gerade kompilierten Klassen-template
"boost::fusion::extension::deref_impl<boost::fusion::iterator_facade_tag>::apply<Iterator>".
1> with
1> [
1>
Iterator=enclosing<int>::employee::employee_iterator<enclosing<int>::employee,0>
1> ]
1> c:\users\ulfi\documents\visual studio
2010\projects\test\test\test.cpp(18): Siehe Verweis auf die
Instanziierung der gerade kompilierten Klassen-template
"boost::fusion::result_of::deref<Iterator>".
1> with
1> [
1>
Iterator=enclosing<int>::employee::employee_iterator<enclosing<int>::employee,0>
1> ]
1>c:\users\ulfi\documents\visual studio
2010\projects\test\test\test.cpp(18): error C2893: Funktionsvorlage
'result_of::deref<Iterator>::type boost::fusion::deref(const Iterator
&)' konnte nicht spezialisiert werden
1> Mit den folgenden Vorlagenargumenten:
1>
'enclosing<T>::employee::employee_iterator<boost_fusion_uglified_Seq,N>'
1> with
1> [
1> T=int,
1> boost_fusion_uglified_Seq=enclosing<int>::employee,
1> N=0
1> ]
I don't have a clue what is wrong here. Is the error on my side? i just
added the template<class T> to the example code of
BOOST_FUSION_DEFINE_STRUCT_INLINE.
Without, everything is fine.
Gretings,
Oswin
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net