Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


// Copyright (C) 2009-2012 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0
// (see accompanying file LICENSE_1_0.txt or a copy at
// Home at

#ifndef ADDABLE_HPP_
#define ADDABLE_HPP_

#include <boost/concept_check.hpp>

template<typename T>
struct Addable { // User-defined concept.
        return_type(x + y); // Check addition `T operator+(T x, T y)`.

    void return_type(T) {} // Implementation (required for some linkers).
    static T const& x;
    static T const& y;

#endif // #include guard