@anonymous/

BountifulQuerulousCron

C++

No description

fork
loading
Files
  • main.cpp

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.1914532267814899","path":"main.cpp","file":{"path":"main.cpp","content":{"asEncoding":{"base64":"ICB0ZW1wbGF0ZTx0eXBlbmFtZSBUPgogIGNsYXNzIEJhZGdlIHsKICAgICAgZnJpZW5kIFQ7CiAgICAgIEJhZGdlKCkge30KICB9OwoKICB0ZW1wbGF0ZTx0eXBlbmFtZSBUPgogIEJhZGdlPFQ+IEZha2VCYWRnZSgpIHsKICAgIHN0YXRpYyBzdHJ1Y3QgU3R1YiB7fSBzdHViOwogICAgcmV0dXJuICooQmFkZ2U8VD4qKSZzdHViOwogIH07CgogIGNsYXNzIERldmljZSB7CiAgcHVibGljOgogICAgc3RhdGljIEJhZGdlPERldmljZT4gZ2V0QmFkZ2UoKSB7IHJldHVybiBCYWRnZTxEZXZpY2U+KCk7IH0KICB9OwoKICB2b2lkIG5lZWREZXZpY2VCYWRnZShCYWRnZTxEZXZpY2U+IGJhZGdlKQogIHsKICB9CgogIGludCBtYWluKCkKICB7CiAgICAgbmVlZERldmljZUJhZGdlKERldmljZTo6Z2V0QmFkZ2UoKSk7CiAgICAgbmVlZERldmljZUJhZGdlKEZha2VCYWRnZTxEZXZpY2U+KCkpOwogICAgIHJldHVybiAwOwogIH0K"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  template<typename T>
  class Badge {
      friend T;
      Badge() {}
  };

  template<typename T>
  Badge<T> FakeBadge() {
    static struct Stub {} stub;
    return *(Badge<T>*)&stub;
  };

  class Device {
  public:
    static Badge<Device> getBadge() { return Badge<Device>(); }
  };

  void needDeviceBadge(Badge<Device> badge)
  {
  }

  int main()
  {
     needDeviceBadge(Device::getBadge());
     needDeviceBadge(FakeBadge<Device>());
     return 0;
  }