0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-07 20:48:55 +02:00

ircd:Ⓜ️ Workaround comparison operator resolution and others for clang.

This commit is contained in:
Jason Volk 2019-06-23 23:36:08 -06:00
parent 7157a9cf8b
commit 83dd5581be
2 changed files with 22 additions and 8 deletions

View file

@ -11,11 +11,29 @@
#pragma once
#define HAVE_IRCD_M_H
/// Matrix Protocol System
// required for clang to consider string_view operators inherited by
// m::id among other import disambiguations.
#ifdef __clang__
namespace ircd::m
{
using std::operator==;
using std::operator!=;
using std::operator<;
using ircd::operator!;
using ircd::json::at;
using ircd::json::get;
}
#endif
// explicit imports required for GCC or clang
namespace ircd::m
{
using ircd::hash;
}
/// Matrix Protocol System
namespace ircd::m
{
struct init;
IRCD_OVERLOAD(generate)
@ -23,11 +41,6 @@ namespace ircd::m
extern struct log::log log;
}
namespace ircd::m::vm
{
struct opts;
}
#include "name.h"
#include "error.h"
#include "self.h"

View file

@ -1114,9 +1114,10 @@ ircd::m::operator==(const room &a, const room &b)
}
bool
ircd::m::operator!=(const room &a, const room &b)
ircd::m::operator!=(const room &a_, const room &b_)
{
return a.room_id != b.room_id;
const string_view &a{a_.room_id}, &b{b_.room_id};
return a != b;
}
bool