PureDMG.com
From Diablo 4 Wiki

Class-specific items can only be used by the class it has assigned to the item.

Blizzard has confirmed that Smart Loot will be present in Diablo 4 which means Smart Loot class-specific drops will only drop for the class you are playing.

Diablo 2 and DIablo 3

Class specific items appear in both Diablo 2 and Diablo 3 and can only be equipped by the class indicated on the item.

Class specific items can drop for other classes but will retain stats for the class it is assigned.

Smart loot drops are always be for the class a player is playing making the drop more useful to the player.