Can *.cpp file include *.h which is has " __host__" in front of function?

Recently,I have found a slam program which is coded in VS2013. I found its *.cpp files include many *.h headers which include many function which have host in front of functions. I know if a function has
host or device must be compiled by NVCC. *.cpp file are not include this function. So I am confused. Could someone know why?
here is the detailed description:
in VoxelUtilHashSDF.h
struct HashDataStruct {

// Host part //

__device__ __host__
HashDataStruct() {

and in DepthSensing.cpp
include “VoxelUtilHashSDF.h” are writted
generally speaking, .cpp can not include this .h file because it has _device host.
I try this condition in linux. I was failed, but in VS2013 can. Why?

The default behavior can be overridden with a compiler switch:

-x cu

read the nvcc manual

If you specify -x cu on the compile command line, then a .cpp file can have CUDA syntax in it.

Thank you very much!