summaryrefslogtreecommitdiff
path: root/netfs/lib/entries.cpp
blob: bde15e62dee95fa9c2fdf69e86c913d7beeaa4ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "entries.h"

static_assert(std::is_nothrow_move_constructible_v<User>);
static_assert(std::is_nothrow_move_assignable_v<User>);
static_assert(std::is_nothrow_move_constructible_v<Group>);
static_assert(std::is_nothrow_move_assignable_v<Group>);

User::User(uid_t u, std::string n, gid_t g) : id(u), name(std::move(n)), group(g) { }

Group::Group(gid_t g, std::string n) : id(g), name(std::move(n)) { }

bool
Group::hasMember(uid_t u) const noexcept
{
	return (members.find(u) != members.end());
}