Skip to content

Instantly share code, notes, and snippets.

View EricWF's full-sized avatar

Eric EricWF

View GitHub Profile
@EricWF
EricWF / function.patch
Last active August 26, 2015 18:08
Function Fix
diff --git a/include/functional b/include/functional
index 3c9f5a7..539a708 100644
--- a/include/functional
+++ b/include/functional
@@ -1475,13 +1475,25 @@ __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const _NOEXCEPT
} // __function
+typedef typename aligned_storage<3*sizeof(void*)>::type _SmallFuncBuf;
+
#ifndef ENTITY_HPP
#define ENTITY_HPP
# include <elib/aux.hpp>
# include <elib/any.hpp>
# include <unordered_map>
# include <typeinfo>
# include <typeindex>
namespace example
/// this is the method "declaration". Just like you declare methods in a header file for a class, this is how you declare
/// methods for an entity. It is important to remember that these are "methods". That means that while the user may see
/// the function signature "void(level &)" the actual signature is "void(entity &, level &)". It has to take a "this" reference.
/// When writing methods you must write the method using the internal interface with the "this" reference.
/// This is the declaration.
/// It should be considered similar to declaring a function as so:
/// class entity {
/// void update_(level &);
enum class my_big_enum
{
/* imagine this changes a lot */
};
@EricWF
EricWF / Order
Last active August 29, 2015 13:57
1. implicit conversion
2. explicit conversion
3. stream operator
4. to_string
enum class A
{
none, one
};
struct A_parser
{
static A parse(std::string const & option)
{
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: logical_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
LIBCXX=$HOME/workspace/libcxx
BUILDLIBCXX=$HOME/workspace/build-libcxx
LIBCXXABI_INCLUDE_PATH="/home/eric/workspace/libcxxabi/include"
rm -rf $BUILDLIBCXX
rm -f $LIBCXX/test/lit.site.cfg
mkdir $BUILDLIBCXX
cd $BUILDLIBCXX
cmake -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_LIBCXXABI_INCLUDE_PATHS=$LIBCXXABI_INCLUDE_PATH\
"$@"\
$LIBCXX
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..60dc367
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+# python temp files
+*.pyc
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
@EricWF
EricWF / results.txt
Created August 15, 2014 09:22
OpenBSD 10 testsuite results
Compilation failed unexpectedly!
********************
Testing Time: 2299.70s
********************
Failing Tests (24):
libc++ :: atomics/atomics.types.generic/trivially_copyable.pass.cpp
libc++ :: experimental/string.view/string.view.access/at.pass.cpp
libc++ :: input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
libc++ :: localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp