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
Line 134: <ClCompile Include="3rdparty\Box2D\Collision\b2BroadPhase.cpp" /> | |
Line 135: <ClCompile Include="3rdparty\Box2D\Collision\b2CollideCircle.cpp" /> | |
Line 136: <ClCompile Include="3rdparty\Box2D\Collision\b2CollideEdge.cpp" /> | |
Line 137: <ClCompile Include="3rdparty\Box2D\Collision\b2CollidePolygon.cpp" /> | |
Line 138: <ClCompile Include="3rdparty\Box2D\Collision\b2Collision.cpp" /> | |
Line 139: <ClCompile Include="3rdparty\Box2D\Collision\b2Distance.cpp" /> | |
Line 140: <ClCompile Include="3rdparty\Box2D\Collision\b2DynamicTree.cpp" /> | |
Line 141: <ClCompile Include="3rdparty\Box2D\Collision\b2TimeOfImpact.cpp" /> | |
Line 142: <ClCompile Include="3rdparty\Box2D\Collision\Shapes\b2ChainShape.cpp" /> | |
Line 143: <ClCompile Include="3rdparty\Box2D\Collision\Shapes\b2CircleShape.cpp" /> |
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
3rdparty\Box2D\Collision\b2BroadPhase.cpp | |
3rdparty\Box2D\Collision\b2CollideCircle.cpp | |
3rdparty\Box2D\Collision\b2CollideEdge.cpp | |
3rdparty\Box2D\Collision\b2CollidePolygon.cpp | |
3rdparty\Box2D\Collision\b2Collision.cpp | |
3rdparty\Box2D\Collision\b2Distance.cpp | |
3rdparty\Box2D\Collision\b2DynamicTree.cpp | |
3rdparty\Box2D\Collision\b2TimeOfImpact.cpp | |
3rdparty\Box2D\Collision\Shapes\b2ChainShape.cpp |
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 <ctime> | |
using namespace std; | |
int main() | |
{ | |
time_t now = time(0); | |
tm ltm; | |
localtime_s(<m, &now); |
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 <unordered_map> | |
namespace std { | |
template <class T> | |
struct member_hash { | |
std::size_t operator()(const T& t) const { | |
return t.hash(); | |
} | |
}; |
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 <type_traits> | |
#include <iostream> | |
using namespace std; | |
template <bool> | |
struct constexpr_if; | |
template <> | |
struct constexpr_if<true> { | |
struct elser { |
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
struct A { int v; }; | |
struct B { int v; }; | |
struct C { int v; }; | |
struct Ar { int& v; }; | |
struct Br { int& v; }; | |
struct Cr { int& v; }; | |
void add_ref(A& a, B& b, C& c) { | |
a.v += c.v; | |
b.v += c.v; |
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
#pragma once | |
#include <future> | |
#include <optional> | |
template <class T> | |
bool is_ready(const std::future<T>& f) { | |
return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready; | |
} | |
template <class T> |
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 <type_traits> | |
#include <iostream> | |
template <class A, class = void> | |
struct has_member : std::false_type {}; | |
template <class A> | |
struct has_member<A, decltype(A::member, void())> : std::true_type {}; | |
struct AA { static constexpr bool member = true; }; |
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
mkdir .deps ; cd .deps | |
cmake -DCMAKE_BUILD_TYPE=Release ../third-party -G Ninja | |
ninja | |
export CFLAGS='-O3 -flto -fuse-ld=lld' | |
export CXXFLAGS='-O3 -flto -fwhole-program-vtables -fuse-ld=lld' | |
export LDFLAGS='-flto -fwhole-program-vtables -fuse-ld=lld' | |
../ | |
mkdir build ; cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. -G Ninja | |
ninja |
OlderNewer