Derived from: https://github.com/PortAudio/portaudio/wiki/UsingTheGitRepository
Official Git reference: https://www.git-scm.com/docs/
Derived from: https://github.com/PortAudio/portaudio/wiki/UsingTheGitRepository
Official Git reference: https://www.git-scm.com/docs/
class Foo{ | |
template<typename X> | |
void foo() | |
{ | |
} | |
template<> | |
void foo<int>() // error: explicit specialization of 'foo' in class scope | |
{ |
#include <iostream> | |
// **Current Solution: Part 1 - send() function** | |
// This is the easy part. | |
// First, a type-level enum helper | |
template<typename EnumClass, EnumClass X> | |
struct EnumValue { |
// These are reduced test cases derived from a work-in-progress (non-production) code base. | |
// Can you spot the bugs that PVS-Studio found? | |
#include <atomic> | |
#include "catch.hpp" | |
/////////////////////////////////////////////////////////////////////////////// | |
// Bug #1 |
# Symbolic integration of [(1 - x^a)^b * e^iwx] dx from -1 to 1 | |
# see discussion on music-dsp mailing list | |
# "Re: [music-dsp] a family of simple polynomial windows and waveforms" | |
from math import factorial | |
from copy import deepcopy | |
import string | |
# binomial coefficient nCk | |
def binomial(n, k): |
# see https://lists.columbia.edu/pipermail/music-dsp/2015-November/000424.html | |
# psd derivation due to Ethan Duni | |
import numpy as np | |
from numpy.fft import fft, fftfreq | |
import matplotlib.pyplot as plt | |
N = 16384*2*2*2*2*2 # FFT size | |
y = (np.random.random(N) * 2) - 1 # ~U(-1,1) | |
r = np.random.random(N) # ~U(0,1) |
/// Inheriting Types From Template Base Class | |
/// ========================================= | |
/// | |
/// I put together this comparison of various methods of looking up types in | |
/// a base class template after noticing that my code would compile correctly | |
/// in MSVC but break in clang and gcc. | |
/// | |
/// Having reviewed the various cases, my conclusion is that MSVC is very | |
/// permissive in looking up names in base class templates. It doesn't | |
/// implement the correct C++ dependent name lookup rules. |
// Template-based async method continuation idea by Ross Bencina <[email protected]> May 2014. | |
// see: https://groups.google.com/forum/#!topic/comp.lang.c++.moderated/ryhWI6cX3Ko | |
#include <iostream> | |
#include <list> | |
typedef void (*async_callback_fn_t)(void*); | |
struct PendingSimulatedTaskCallback{ | |
async_callback_fn_t simulatedAsyncCallbackFn_; |
// Template-based Coroutine continuation idea by Ross Bencina <[email protected]> May 2014. | |
// see: https://groups.google.com/forum/#!topic/comp.lang.c++.moderated/ryhWI6cX3Ko | |
#include <iostream> | |
class MyCoroutine { | |
typedef MyCoroutine this_t; | |
typedef bool (this_t::*coroutine_fn_t) (); | |
coroutine_fn_t next_; |