You are a genius.

by (Login ComputerGhost)
R

 

I didn't think TR1 had an array type. But anyways, I was focusing on C++0x (C++11). The CreateType() function was named thus because I already had an A struct in my test.cpp file, but I didn't include that struct in the post and didn't change the function name.

For the array, I have to have:
template<template <typename T, std::size_t Size> class Array>
...

Instead of (I tried this one):
template<template <typename T, int Size> class Array>
...

With the second piece of code, the compiler's error messages just aren't very helpful. The first one, though, works.

Posted on Feb 22, 2012, 3:52 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
* I'm no genius. Just remember that arrays can't have sizes < 0. ;)ChronoKitsune on Feb 23

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement