Specializing a deleted function template?

Should this work? (clang doesn't accept it)

#include <iostream>
#include <string>

template <typename T> constexpr T ntoh ( T net ) noexcept = delete;
template <> constexpr unsigned ntoh ( unsigned net ) noexcept { return 1; }
template <> constexpr unsigned long ntoh ( unsigned long net ) noexcept { return 2; }
template <> constexpr unsigned long long ntoh ( unsigned long long net ) noexcept { return 3; }

int main( int argc, char *argv )
{
//
  std::cout << ntoh ( 1U ) << std::endl;
  std::cout << ntoh ( 1UL ) << std::endl;
  std::cout << ntoh ( 1ULL ) << std::endl;
// std::cout << ntoh ( 1 ) << std::endl;
}

If I comment out the line with = delete

template <typename T> constexpr T ntoh ( T net ) noexcept; // = delete;

Then it compiles and runs.
If I uncomment the line

// std::cout << ntoh ( 1 ) << std::endl;

I get a link time error bemoaning the lack of "int ntoh<int>(int)" (which is what I expect).
However, a compile-time error would be better (and that was the point of the = delete on the primary template)
Kyle mentioned core issue 941 as the rationale for this technique.
  C++ Standard Core Language Defect Reports and Accepted Issues

The clang status page at <http://clang.llvm.org/cxx_dr_status.html&gt; shows the status of this issue as "Unknown".

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists@gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

Should this work? (clang doesn't accept it)

#include <iostream>
#include <string>

template <typename T> constexpr T ntoh ( T net ) noexcept = delete;
template <> constexpr unsigned ntoh ( unsigned net ) noexcept { return 1; }
template <> constexpr unsigned long ntoh ( unsigned long net ) noexcept { return 2; }
template <> constexpr unsigned long long ntoh ( unsigned long long net ) noexcept { return 3; }

int main( int argc, char *argv )
{
//
  std::cout << ntoh ( 1U ) << std::endl;
  std::cout << ntoh ( 1UL ) << std::endl;
  std::cout << ntoh ( 1ULL ) << std::endl;
// std::cout << ntoh ( 1 ) << std::endl;
}

If I comment out the line with = delete

template <typename T> constexpr T ntoh ( T net ) noexcept; // = delete;

What I meant here is "if I comment out the "= delete" - not the whole line.

Then it compiles and runs.
If I uncomment the line

// std::cout << ntoh ( 1 ) << std::endl;

I get a link time error bemoaning the lack of "int ntoh<int>(int)" (which is what I expect).
However, a compile-time error would be better (and that was the point of the = delete on the primary template)
Kyle mentioned core issue 941 as the rationale for this technique.
  C++ Standard Core Language Defect Reports and Accepted Issues

The clang status page at <http://clang.llvm.org/cxx_dr_status.html&gt; shows the status of this issue as "Unknown".

gcc 4.7.2 compiles the test program, and gives an error if I uncomment:

std::cout << ntoh ( 1 ) << std::endl;

junk.cpp: In function ‘int main(int, char**)’:
junk.cpp:25:25: error: use of deleted function ‘constexpr T ntoh(T) [with T = int]’
junk.cpp:14:52: error: declared here

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists@gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki