Can anyone tell me why this template constructor only works at global scope? Is this a g++ bug (I'm using g++ 4.5)? // g++ -std=c++0x t.cpp class T { public: template<int N> T(int (&a)[N]) {} }; T t1 = (int[]) {1, 2, 3}; // OK int main(int argc, char **argv) { T t2 = (int[]) {1, 2, 3}; // error: conversion from 'int [3]' to non-scalar type 'T' requested } I realize I could use a std::initializer_list<int> constructor instead, but I'm curious why what I'm trying doesn't work. Thanks, Ben