Skip to content

Instantly share code, notes, and snippets.

@edouarda
Created October 22, 2015 09:29
Show Gist options
  • Save edouarda/eaceb1357ccb8e6d6eff to your computer and use it in GitHub Desktop.
Save edouarda/eaceb1357ccb8e6d6eff to your computer and use it in GitHub Desktop.
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/adapted/struct/define_struct.hpp>
#include <boost/fusion/include/define_struct.hpp>
#include <boost/fusion/container/vector/convert.hpp>
#include <boost/fusion/include/as_vector.hpp>
#include <string>
#include <cstdint>
BOOST_FUSION_DEFINE_STRUCT((qdb), complex_struct,
(std::string, a)
(std::string, b)
(std::string, c)
(std::string, d)
(std::uint8_t, one)
(std::uint16_t, two)
(std::uint32_t, three)
(std::uint64_t, four)
(std::uint16_t, five)
(std::int8_t, six)
(std::uint32_t, seven))
int main(int argc, char ** argv)
{
using bug = boost::fusion::result_of::as_vector<qdb::complex_struct>::type;
return 0;
}
1>------ Build started: Project: fusion_bug, Configuration: Debug Win32 ------
1> Source.cpp
1>d:\sources\boost\boost_1_57_0\boost\fusion\container\vector\convert.hpp(26): error C2903: 'apply' : symbol is neither a class template nor a function template
1> d:\sources\fusion_bug\fusion_bug\source.cpp(27) : see reference to class template instantiation 'boost::fusion::result_of::as_vector<qdb::complex_struct>' being compiled
1>d:\sources\boost\boost_1_57_0\boost\fusion\container\vector\convert.hpp(26): error C2027: use of undefined type 'boost::fusion::detail::as_vector<11>'
1>d:\sources\boost\boost_1_57_0\boost\fusion\container\vector\convert.hpp(26): error C2143: syntax error : missing ';' before '<'
1>d:\sources\boost\boost_1_57_0\boost\fusion\container\vector\convert.hpp(26): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\sources\boost\boost_1_57_0\boost\fusion\container\vector\convert.hpp(26): error C2039: 'type' : is not a member of '`global namespace''
1>d:\sources\boost\boost_1_57_0\boost\fusion\container\vector\convert.hpp(27): error C2238: unexpected token(s) preceding ';'
1>d:\sources\fusion_bug\fusion_bug\source.cpp(27): error C2039: 'type' : is not a member of 'boost::fusion::result_of::as_vector<qdb::complex_struct>'
1>d:\sources\fusion_bug\fusion_bug\source.cpp(27): error C2061: syntax error : identifier 'type'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment