Using optional<T> as "pointer" type

30 views
Skip to first unread message

Matthias Vallentin

unread,
Mar 7, 2017, 1:28:56 PM3/7/17
to FlatBuffers
Would it be possible to use optional<T> instead of unique_ptr<T> as --cpp-ptr-type? I was wondering whether that's a feasible alternative to remove pressure from the allocator.

More generally, what are the type requirements for feasible? Is there some form of concept that describes them?

Wouter van Oortmerssen

unread,
Mar 8, 2017, 4:19:39 PM3/8/17
to Matthias Vallentin, FlatBuffers
We haven't documented what other pointers work instead, since we haven't tested that. Most smart-pointer types should work. Easiest is to just try and see.. please report any issues.

On Tue, Mar 7, 2017 at 10:28 AM, Matthias Vallentin <matt...@vallentin.net> wrote:
Would it be possible to use optional<T> instead of unique_ptr<T> as --cpp-ptr-type? I was wondering whether that's a feasible alternative to remove pressure from the allocator.

More generally, what are the type requirements for feasible? Is there some form of concept that describes them?

--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages