I update my Xcode to version 9 and fall to build my app containing Tensorflow framework. It seems that the following code:
#ifndef Header_h
#define Header_h
template<class T1, class T2, int I> class A {}; // primary template
template<class T1, int I, class T2> class A<T1, T2, I> {}; //error
#endif /* Header_h */
will be rejected by Xcode 9 with error message "Partial template specialization is not more specialized than primary template". But in Xcode 8.3.3 and visual studio, it is good.
Here is the original Tensorflow code: (TensorStorage.h)
template<typename T, typename Dimensions, int Options_> class TensorStorage;
// Pure fixed-size storage
template<typename T, int Options_, typename FixedDimensions>
class TensorStorage<T, FixedDimensions, Options_>
{
//implementation
};
// pure dynamic
template<typename T, int Options_, typename IndexType, int NumIndices_>
class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>
{
//implementation
};
Thanks