Hi,
I have some idea related to the usage of UDLs in Boost.Geometry library
but the way I'd like to handle it is AFAIK not supported.
A little introduction first. There are many text-based languages of
defining data. One of them is WKT
(http://en.wikipedia.org/wiki/Well-known_text) which allows to define
vector data e.g. a polygon like this:
|POLYGON((30 10, 40 40, 20 40, 10 20, 30 10))|
So my thought was: why not use C++11 UDLs for this purpose? There are
operators in the WKT language so I should probably use string literal,
put WKT in it and be happy with it. The use case could look like this:
|auto ||polygon = "POLYGON((30 10,40 40,20 40,10 20,30 10))|"_wkt;
Ok so now the tricky part. It should be parsed in compile-time, the type
of the geometry retrieved from the string literal and proper type
returned (bg::polygon<> in this case).
Unfortunately string literals can't be handled as raw literals, e.g.
using the variadic-template version of operator"":
template