The Stack Overflow podcast is back! Listen to an interview with our new CEO.
1
reputation
1

ksk

class Me {
public:
    enum Language {
        kCCpp = 0,   // C/C++
        kPowershell, // Powershell
        kDirectX,    // DirectX(HLSL)
    };

    void Gulp( MonsterEnergy&& m ) {
        m_stomach.push( std::move( m ) );
    }

    void DoCode( Language l ) {
        if ( m_stomach.empty() ) {
            throw OutOfEnergyException( "Unable to code." );
        }

        switch ( l ) {
        case kCCpp:
            std::cout << "C++11 FTW" << std::endl;
            break;
        case kPowershell:
            std::cout << "|||||||||||||" << std::endl;
            break;
        case kDirectX:
            std::cout << "dx12??? MOAR FPS!!1!" << std::endl;
        }

        m_stomach.pop();
    }

private:
    std::queue< MonsterEnergy > m_stomach;
};
  • Member for 4 years, 2 months
  • 1 profile view
  • Last seen Apr 19 '17 at 11:04