Different policy about "constexpr" keyword in g++ and nvcc?

I’m curious about why this statement is differently interpreted in g++ and nvcc on linux OS.

// test.cu
#include "mpi.h"

constexpr MPI_Datatype type = MPI_CHAR;

int main() {}

nvcc version is 11.0, and g++ version is 7.3.0.
Each compile sentence is:

g++ -o test -x c++ -std=c++17 -L[MPI Library Directory] -lmpi test.cu
nvcc -o test -std=c++17 test.cu -L[MPI Library Directory] -lmpi test.cu

I thought “-std=c++17” flag with nvcc brings the same consequence with that flag with g++.
But g++ can compile, and nvcc gives:

test.cu(3): error: expression must have a constant value

Do I understand something wrong?
Or something internal problem exists?

Additionally, this doesn’t happen on Windows.

Thank you.

Could you please report a bug ticket to us following Getting Help with CUDA NVCC Compiler Thanks.