Created
February 25, 2015 02:41
-
-
Save stuartcampbell/22c809462bdf380d9303 to your computer and use it in GitHub Desktop.
Demo of boost issue for support case 1178175
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <algorithm> | |
| #include <string> | |
| #include <vector> | |
| #include <boost/lexical_cast.hpp> | |
| int main() { | |
| // Define (and initialise) a string vector | |
| std::vector<std::size_t> intVector; | |
| intVector.push_back(1); | |
| intVector.push_back(2); | |
| intVector.push_back(3); | |
| // Define another string vector | |
| std::vector<std::string> strVector(intVector.size()); | |
| std::transform(intVector.begin(), intVector.end(), strVector.begin(), | |
| boost::lexical_cast<std::string, size_t>); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment