Sha256: 15748e325381448f1728db20867943db8c6deadb3061662b1f8c0a3e9473aef3

Contents?: true

Size: 951 Bytes

Versions: 9

Compression:

Stored size: 951 Bytes

Contents

// Copyright (C) 2015  Davis E. King (davis@dlib.net)
// License: Boost Software License   See LICENSE.txt for the full license.

#include <memory>
#include <iostream>

using namespace std;

class testme
{
public:

    testme(testme&&) = default;
    testme(const testme&) = delete;


    template <typename T>
    auto auto_return(T f) -> decltype(f(4)) { return f(4); }

    template <typename T>
    auto auto_return(T f) -> decltype(f()) { return f(); }

    static int returnint() { return 0; }

    void dostuff()
    {
        thread_local int stuff1 = 999;
        auto x = 4;

        decltype(x) asdf = 9;

        auto f = []() { cout << "in a lambda!" << endl; };
        f();

        auto_return(returnint);
    }

    template <typename ...T>
    void variadic_template(
        T&& ...args
    )
    {
    }



    std::shared_ptr<int> asdf;
};

// ------------------------------------------------------------------------------------

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dlib-1.2.2 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.2.1 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.2.0 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.1.5 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.1.4 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.1.3 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.1.2 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.1.1 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
dlib-1.1.0 ext/dlib-19.4/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp