STYLE: make null constructed lists constexpr, noexcept

- can assist the compiler in producing tighter code.
This commit is contained in:
Mark Olesen
2018-03-19 13:53:28 +01:00
parent ca15b5779d
commit 4cb763f9d2
27 changed files with 549 additions and 450 deletions

View File

@ -60,7 +60,7 @@ public:
// Constructors
//- Construct null initializing count to 0
refCount()
constexpr refCount() noexcept
:
count_(0)
{}
@ -69,13 +69,13 @@ public:
// Member Functions
//- Return the current reference count
int count() const
int count() const noexcept
{
return count_;
}
//- Return true if the reference count is zero
bool unique() const
bool unique() const noexcept
{
return !count_;
}