Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2006-10-26 11:22:23


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Arno Schödl
> Sent: Thursday, October 26, 2006 2:45 AM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] Using MPL to cut array?
>
> __FILE__ is a macro for the path to the current source file. I would like
> to remove the common prefix (like "c:\dev\my_program\") from it, which is
> in a preprocessor macro SOLUTIONDIR. Is there a metaprogramming way to do
> that?
>
> So the class TSuffix should be used like this:
>
> TSuffix<x, n>::value // cuts prefix of length n off char array x

[Nat] ? Is MPL needed? For a classic const char[] string literal, wouldn't (__FILE__ + n) get you what you want?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net