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
/*============================================================================= | |
Copyright (c) 2001-2013 Joel de Guzman | |
Distributed under the Boost Software License, Version 1.0. (See accompanying | |
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
==============================================================================*/ | |
#if !defined(BOOST_SPIRIT_X3_GRAMMAR_JAN_19_2012_0454PM) | |
#define BOOST_SPIRIT_X3_GRAMMAR_JAN_19_2012_0454PM | |
#if defined(_MSC_VER) |
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 <string> | |
#define BOOST_SPIRIT_X3_NO_RTTI | |
#include <boost/spirit/home/x3.hpp> | |
#include <boost/spirit/home/x3/support/ast/variant.hpp> | |
#include <boost/fusion/include/adapt_struct.hpp> | |
namespace x3 = boost::spirit::x3; |
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 <iostream> | |
template<char...> | |
struct str {}; | |
template<char c> | |
struct ch {}; | |
template<int n> | |
using idx = std::integral_constant<int, n>; |
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 <iostream> | |
#include <utility> | |
#include <tuple> | |
#include <boost/preprocessor/variadic/to_seq.hpp> | |
#include <boost/preprocessor/seq/for_each.hpp> | |
#include <boost/preprocessor/cat.hpp> | |
template<char... cs> | |
using str = std::integer_sequence<char, cs...>; |
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 <iostream> | |
template<class A, class B> | |
struct P; | |
template<class... Ts> | |
struct L {}; | |
template<class T, class... Ts> | |
using mul = L<P<T, Ts>...>; |
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 <iostream> | |
#include <cstdio> | |
#include <boost/interprocess/sync/file_lock.hpp> | |
#include <boost/interprocess/sync/scoped_lock.hpp> | |
int main(int argc, char** argv) | |
{ | |
namespace ipc = boost::interprocess; | |
std::fclose(std::fopen("lock", "w")); | |
ipc::file_lock flock("lock"); |
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 <iostream> | |
#include <exception> | |
#include <functional> | |
#include <memory> | |
#include <boost/context/all.hpp> | |
#include <boost/optional/optional.hpp> | |
struct forced_unwind {}; | |
struct resumer_base |
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 <iostream> | |
__attribute__((noinline)) bool is_upward_test(char* a) | |
{ | |
char b[32]; | |
return a < b; | |
} | |
bool is_upward() | |
{ |
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 <iostream> | |
#include <boost/context/all.hpp> | |
bool is_upward() | |
{ | |
struct C | |
{ | |
boost::context::fcontext_t master; | |
char stack1[512], stack2[512]; | |
} c; |
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 <iostream> | |
// Kahan summation algorithm | |
template<class T> | |
struct accum | |
{ | |
T t, y; | |
accum(T val = 0): t(val), y() {} | |
OlderNewer