Skip to content

Instantly share code, notes, and snippets.

@zao
Created February 29, 2012 18:23
Show Gist options
  • Save zao/1943308 to your computer and use it in GitHub Desktop.
Save zao/1943308 to your computer and use it in GitHub Desktop.
at_c test
#include <boost/phoenix.hpp>
#include <boost/fusion/adapted.hpp>
#include <iostream>
struct S
{
int a0, a1, a2, a3, a4, a5, a6, a7;
};
BOOST_FUSION_ADAPT_STRUCT(S,
(int, a0)
(int, a1)
(int, a2)
(int, a3)
(int, a4)
(int, a5)
(int, a6)
(int, a7))
int main()
{
S s = { 40, 41, 42, 43, 44, 45, 46, 47 };
std::cerr << boost::phoenix::at_c<7>(s)() << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment