mirror-chatterino2/src/common/Property.hpp

35 lines
464 B
C++
Raw Normal View History

#pragma once
#include "boost/noncopyable.hpp"
namespace chatterino {
template <typename T>
class Property final : boost::noncopyable
{
public:
Property()
{
}
Property(const T &_value)
: value(_value)
{
}
T &operator=(const T &f)
{
return value = f;
}
operator T const &() const
{
return value;
}
protected:
T value;
};
} // namespace chatterino