|
Boost Users : |
Subject: [Boost-users] [filesystem] Using basic_path in char-type generic code
From: Adam Badura (abadura_at_[hidden])
Date: 2010-02-26 04:49:13
I have a char-type generic function (character type is template
argument). I use only char and wchar_t character types with this function
and I don't care for other character types. I wanted to use basic_path in
that function so that I will get either path or wpath depending on the
template argument.
But I failed to do that since basic_path has second template argument
(Traits) which - as opposed to basic_string - does not default to anything.
Even more, there is no (or at least documentation does not mention that)
default path_traits template which could be parametrized with the desired
character type.
Why is it so? How to overcome it (otherwise then writing my own
auxiliary type selector)?
(I am using version boost 1.39 and will - hopefully, if it will correct
compilation errors - switch to 1.43 when it will be released.)
Adam Badura
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