Skip to content

Commit b526a2d

Browse files
committed
The Fn*Ref types don't use uintptr_t afterall, they use a union
This allows them to be constexpr constructed from a lambda, even if they can't be constexpr-evaluated.
1 parent 59c1124 commit b526a2d

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

subspace/fn/fn_ref.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
#pragma once
1616

17-
#include <stdint.h>
18-
1917
#include "subspace/fn/callable.h"
2018
#include "subspace/macros/lifetimebound.h"
2119
#include "subspace/mem/addressof.h"

subspace/lib/lib.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ static_assert(INT_MAX == INT32_MAX);
2626
static_assert(sus::mem::size_of<size_t>() >= 4);
2727
static_assert(sus::mem::size_of<size_t>() <= 8);
2828

29-
// FnRef types expect to be able to store function and object pointers in a
30-
// uintptr_t.
31-
static_assert(sus::mem::size_of<void*>() <= sus::mem::size_of<uintptr_t>());
32-
static_assert(sus::mem::size_of<void (*)()>() <=
33-
sus::mem::size_of<uintptr_t>());
34-
3529
// TODO: Consider if we should only support little endian? We probably make this
3630
// assumption. Support for endian *conversion* is still important for network
3731
// byte order etc.

0 commit comments

Comments
 (0)