#getting type name at compiletime

27 messages · Page 1 of 1 (latest)

cobalt herald
hollow python
#

Instead of return ""; you might want to #error for an unsupported compiler

#

Depending on your design goals / what guarantees your library wants to provide

hollow python
cobalt herald
#

oo

cobalt herald
#

oh the function is literally defined above

hollow python
#

I found the substring helper a nice way to be expressive but you can definitely do it with signature.rfind('>') - start

cobalt herald
cobalt herald
#

your helper doesnt handle i being npos

#

does it happen anyway? HM

#

no

#

i dont think

cobalt herald
#

i made before, after, and between string functions

cobalt herald
#

is this the only way to achieve this?

hollow python
#

There's never just one way to do a problem but that should work

cobalt herald
hollow python
#

What are your goals?

#

Rediculous efficiency? Clean and expressive code?

cobalt herald
#

best practices

hollow python
#

One thing that would help are comments explaining what __PRETTY_FUNCTION__/__FUNCSIG__ look like on the various compilers

#

And in turn explaining what on earth is going on with between("= ", "]")

cobalt herald
#

ah

#

ok