I am currently in the process of learning the Boost framework, and I have found out how to list all folders and files on my system, using
#include
It also depends how many files are present in the folder. If there are many files, then it does take a lot of time. Did you try with a folder containing very few files?