Created
February 29, 2012 18:23
-
-
Save zao/1943308 to your computer and use it in GitHub Desktop.
at_c test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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