On Wed, Jun 3, 2015 at 2:42 PM, Andrzej Krzemienski
Could you provide some sketch of a real life scenario? The examples show how I can use it, but I fail to imagine why I would need it. You mentioned storing the results of various DB queries, how would you make use of data stored in such way?
Reards, &rzej
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
I put together a simple example below. I have used a querying library that
returns results in a similar fashion.
// Define some classes
class Paper {//...};
class Notepad {//...};
class Folder {//...};
class Trash {//...};
class Cookie {//...};
class Candy {//...};
class Stapler {//...};
class Coin {//...};
class database
{
public:
enum class OBJECT_TYPES { PAPER, NOTEPAD, FOLDER, TRASH, COOKIE,
CANDY, STAPLER, COIN };
bool peek()
{
return index >= data.size() ? false : true;
}
OBJECT_TYPES type(size_t column)
{
return types_[column];
}
template<typename T>
T* next()
{
return static_cast